
{"id":2067,"date":"2013-10-29T13:55:44","date_gmt":"2013-10-29T13:55:44","guid":{"rendered":"http:\/\/ubuntuhandbook.org\/?p=2067"},"modified":"2013-10-29T13:57:22","modified_gmt":"2013-10-29T13:57:22","slug":"install-wordpress-ubuntu-13-10-server","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2013\/10\/install-wordpress-ubuntu-13-10-server\/","title":{"rendered":"How to Install WordPress in Ubuntu 13.10 Server"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/wordpress-logo-simplified.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/wordpress-logo-simplified.png\" alt=\"install wordpress ubuntu 13.10\" width=\"220\" height=\"220\" class=\"aligncenter size-full wp-image-2068\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/wordpress-logo-simplified.png 220w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/wordpress-logo-simplified-150x150.png 150w\" sizes=\"auto, (max-width: 220px) 100vw, 220px\" \/><\/a><\/p>\n<p>If you&#8217;ve already <a href=\"https:\/\/ubuntuhandbook.org\/index.php\/2013\/10\/install-lamp-ubuntu-13-10-server\/\" title=\"install LAMP ubuntu 13.10\" target=\"_blank\">installed LAMP (Linux, Apache, MySQL, PHP)<\/a> or LNMP in Ubuntu Server, now it&#8217;s time to install wordpress on Ubuntu and get your site running!<\/p>\n<p>WordPress is a popular blogging tool and a content management system (CMS) based on PHP and MySQL. It\u2019s free and open-source. In the steps below the lines that the user needs to enter or customize will be in <span style=\"color:red;\">red<\/span> in this tutorial!<\/p>\n<h3>1. Create MySQL Database and User for WordPress<\/h3>\n<p><b>If you&#8217;re using LAMP<\/b>, install <b>PhpMyAdmin<\/b> to get a graphical way setting your MySQL Database.<\/p>\n<p>To install PhpMyAdmin, run command below in Ubuntu server:<\/p>\n<pre>sudo apt-get install phpmyadmin<\/pre>\n<p>Choose <b>apache2<\/b> webserver while the installing process and say <b>NO<\/b> to &#8220;Configure database for phpmyadmin with dbconfig-common?&#8221;<\/p>\n<p>Once installed, run commands below to get it working:<\/p>\n<pre>sudo sh -c 'echo \"Include \/etc\/phpmyadmin\/apache.conf\" >> \/etc\/apache2\/apache2.conf' && sudo service apache2 restart<\/pre>\n<p>Now, go to <u>http:\/\/UBUNTUSERVERIP\/phpmyadmin\/<\/u> in your client&#8217;s browser and type in <b>root<\/b> and the password you set when MySQL was installed to login.<\/p>\n<div id=\"attachment_2069\" style=\"width: 530px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/phpmyadmin-login.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2069\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/phpmyadmin-login.jpg\" alt=\"phpmyadmin login\" width=\"520\" height=\"313\" class=\"size-full wp-image-2069\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/phpmyadmin-login.jpg 520w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/phpmyadmin-login-300x180.jpg 300w\" sizes=\"auto, (max-width: 520px) 100vw, 520px\" \/><\/a><p id=\"caption-attachment-2069\" class=\"wp-caption-text\">phpmyadmin login<\/p><\/div>\n<p>Follow the steps below to create <b>Database<\/b> and <b>user<\/b>:<\/p>\n<blockquote><p>Step 1 &#8211; Click on <b>Users<\/b> then click <b>Add User<\/b>.<br \/>\nStep 2 &#8211; Type in your desired <b>User name<\/b> (wordpress is a good one) and ensure <b>Use text field<\/b> is selected. Ensure <b>Host<\/b> is set to <b>Local<\/b> from the drop down list and the text box will change to <b>localhost<\/b> and enter a <b>Password<\/b> and then confirm it in the <b>Re-type<\/b> box. Ensure the Password Use text field is also selected.<br \/>\nStep 3 &#8211; Click on <b>Create database with same name and grant all priviliges.<\/b><br \/>\nStep 4 &#8211; Click on <b>Go<\/b>.<\/p><\/blockquote>\n<div id=\"attachment_2070\" style=\"width: 590px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/phpmyadmin-create-user.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2070\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/phpmyadmin-create-user.jpg\" alt=\"phpmyadmin create user and database\" width=\"580\" height=\"328\" class=\"size-full wp-image-2070\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/phpmyadmin-create-user.jpg 580w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/phpmyadmin-create-user-300x169.jpg 300w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><p id=\"caption-attachment-2070\" class=\"wp-caption-text\">phpmyadmin create user and database<\/p><\/div>\n<p><b>If you&#8217;re using LNMP (Linux, Nginx, MySQL, PHP)<\/b>, follow the steps below to create user &#038; database (both are <span style=\"color:red;\">wordpress<\/span> in commands below).<\/p>\n<blockquote><p>Step 1 &#8211; Run command in Ubuntu Server to log into MySQL Shell with MySQL root password:<\/p>\n<pre>mysql -u root -p<\/pre>\n<p>Step 2 &#8211; Create database, here I named it wordpress:<\/p>\n<pre>CREATE DATABASE <span style=\"color:red;\">wordpress;<\/span><\/pre>\n<p>Step 3 &#8211; Create a new user also named wordpress:<\/p>\n<pre>CREATE USER <span style=\"color:red;\">wordpress<\/span>@localhost;<\/pre>\n<p>Step 4 &#8211; Set a password for this user:<\/p>\n<pre>SET PASSWORD FOR <span style=\"color:red;\">wordpress<\/span>@localhost= PASSWORD(\"<span style=\"color:red;\">12345678<\/span>\");<\/pre>\n<p>Step 5 &#8211; Grant all privileges to the new user:<\/p>\n<pre>GRANT ALL PRIVILEGES ON <span style=\"color:red;\">wordpress<\/span>.* TO <span style=\"color:red;\">wordpress<\/span>@localhost IDENTIFIED BY '<span style=\"color:red;\">12345678<\/span>';<\/pre>\n<p>Step 6 &#8211; Refresh MySQL:<\/p>\n<pre>FLUSH PRIVILEGES;<\/pre>\n<p>Exit MySQL shell:<\/p>\n<pre>exit<\/pre>\n<\/blockquote>\n<h3>2. Download WordPress<\/h3>\n<p>On Ubuntu Server, run command below to download the latest wordpress package from its official site:<\/p>\n<pre>cd && wget http:\/\/wordpress.org\/latest.tar.gz<\/pre>\n<p>Then uncompress it via command below:<\/p>\n<pre>tar -xzvf latest.tar.gz <\/pre>\n<h3>3. Setup WordPress Configuration<\/h3>\n<p>First copy the sample wordpress configuration file into a new config file:<\/p>\n<pre>cd && cp wordpress\/wp-config-sample.php wordpress\/wp-config.php<\/pre>\n<p>Then edit the file with command below:<\/p>\n<pre>vi wordpress\/wp-config.php<\/pre>\n<p>Find the section that contains the field below and substitute in the correct name for your database, username, and password:<\/p>\n<blockquote><p>\/\/ ** MySQL settings &#8211; You can get this info from your web host ** \/\/<br \/>\n\/** The name of the database for WordPress *\/<br \/>\ndefine(&#8216;DB_NAME&#8217;, &#8216;<span style=\"color:red;\">wordpress<\/span>&#8216;);<\/p>\n<p>\/** MySQL database username *\/<br \/>\ndefine(&#8216;DB_USER&#8217;, &#8216;<span style=\"color:red;\">wordpress<\/span>&#8216;);<\/p>\n<p>\/** MySQL database password *\/<br \/>\ndefine(&#8216;DB_PASSWORD&#8217;, &#8216;<span style=\"color:red;\">12345678<\/span>&#8216;);<\/p><\/blockquote>\n<p>Press <b>i<\/b> to start editing, and <b>Esc<\/b> to end editing. Finally press <b>Shift+:<\/b> followed by <b>wq<\/b> and Enter to save and exit the file.<\/p>\n<h3>4 Copy the files<\/h3>\n<p>Now move WordPress files to webserver root directory:<\/p>\n<blockquote><p>For LAMP:<\/p>\n<pre>cd && sudo rsync -avP wordpress\/ \/var\/www\/<\/pre>\n<p>For LNMP:<\/p>\n<pre>cd && sudo rsync -avP wordpress\/ \/usr\/share\/nginx\/html\/<\/pre>\n<\/blockquote>\n<p>Give ownership of the directory to the apache\/nginx user:<\/p>\n<pre>cd \/var\/www\/  ###For nginx: cd \/usr\/share\/nginx\/html\/\n\nsudo chown www-data:www-data * -R \n\nsudo usermod -a -G www-data www-data<\/pre>\n<h3>5. Install WordPress:<\/h3>\n<p>Now in your client&#8217;s web browser go to <u>http:\/\/UBUNTUSERVERIP\/wp-admin\/install.php<\/u> and install your wordpress site:<\/p>\n<div id=\"attachment_2071\" style=\"width: 530px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/installing-wordpress-ubuntu1310.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2071\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/installing-wordpress-ubuntu1310.jpg\" alt=\"installing wordpress\" width=\"520\" height=\"312\" class=\"size-full wp-image-2071\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/installing-wordpress-ubuntu1310.jpg 520w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/installing-wordpress-ubuntu1310-300x179.jpg 300w\" sizes=\"auto, (max-width: 520px) 100vw, 520px\" \/><\/a><p id=\"caption-attachment-2071\" class=\"wp-caption-text\">installing wordpress<\/p><\/div>\n<p>Once done, if you still get &#8220;It Works!&#8221; Apache page. Run command below to edit dir.conf:<\/p>\n<pre>sudo vi \/etc\/apache2\/mods-enabled\/dir.conf<\/pre>\n<p>You will see a line of index files (index.html, index.php, index.cgi, etc) under the DirectoryIndex setting. Add <b>index.php<\/b> as the first item in the list.<\/p>\n<p>After that, restart Apache server by:<\/p>\n<pre>sudo service apache2 restart<\/pre>\n<p>Now you can access your new website:<\/p>\n<div id=\"attachment_2072\" style=\"width: 590px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/install-wordpress-finish.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2072\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/install-wordpress-finish.jpg\" alt=\"wordpress site \" width=\"580\" height=\"358\" class=\"size-full wp-image-2072\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/install-wordpress-finish.jpg 580w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/install-wordpress-finish-300x185.jpg 300w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><p id=\"caption-attachment-2072\" class=\"wp-caption-text\">wordpress site<\/p><\/div>","protected":false},"excerpt":{"rendered":"<p>If you&#8217;ve already installed LAMP (Linux, Apache, MySQL, PHP) or LNMP in Ubuntu Server, now it&#8217;s time to install wordpress on Ubuntu and get your site running! WordPress is a popular blogging tool and a content management system (CMS) based on PHP and MySQL. It\u2019s free and open-source. In the steps below the lines that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[37,158],"class_list":["post-2067","post","type-post","status-publish","format-standard","hentry","category-howtos","tag-ubuntu-13-10","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/2067","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=2067"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/2067\/revisions"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=2067"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=2067"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=2067"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}