{"id":179,"date":"2013-07-03T03:00:39","date_gmt":"2013-07-03T03:00:39","guid":{"rendered":"http:\/\/ubuntuhandbook.org\/?p=179"},"modified":"2024-04-22T15:12:23","modified_gmt":"2024-04-22T15:12:23","slug":"how-to-install-wordpress-on-ubuntu-13-04-server","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2013\/07\/how-to-install-wordpress-on-ubuntu-13-04-server\/","title":{"rendered":"How to Install WordPress on Ubuntu Server"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/07\/Wordpress.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-184\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/07\/Wordpress.png\" alt=\"Wordpress\" width=\"500\" height=\"310\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/07\/Wordpress.png 500w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/07\/Wordpress-300x186.png 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><br \/>\nAlready installed <a title=\"Install Apache, PHP, Mysql web server pack in Ubuntu\" href=\"https:\/\/ubuntuhandbook.org\/index.php\/2013\/07\/setup-lamp-ubuntu-server\/\" target=\"_blank\" rel=\"noopener\">LAMP<\/a> or LEMP (Nginx with PHP, Mysql) on your Ubuntu Server? This time I&#8217;m going to show you how to install WordPress CMS.<\/p>\n<p>WordPress is a popular blogging tool and a content management system (CMS) based on PHP and MySQL. It&#8217;s free and open-source.<\/p>\n<p>To install WordPress, first login your Ubuntu Server as root, then follow the steps below:<\/p>\n<p>1.) Create Mysql Database and User for WordPress.<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>First log into Mysql as root user:\n<pre>mysql -u root -p<\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Type in the root password to get past.<\/p>\n<ul>\n<li>Create a database. Change database-name in code to whatever you want.\n<pre>CREATE DATABASE <b>database-name<\/b>;<\/pre>\n<\/li>\n<li>Create an user. Change database-user in code to whatever you want.\n<pre>CREATE USER <b>database-user<\/b>@localhost;<\/pre>\n<\/li>\n<li>Give a password to the user just created. Change password-here in code.\n<pre>SET PASSWORD FOR <b>database-user<\/b>@localhost= PASSWORD(\"<b>password-here<\/b>\");<\/pre>\n<\/li>\n<li>Grant all privileges to the new user.\n<pre>GRANT ALL PRIVILEGES ON <b>database-name<\/b>.* TO <b>database-user<\/b>@localhost IDENTIFIED BY '<b>password-here<\/b>';<\/pre>\n<\/li>\n<li>f.) Finally, refresh Mysql:\n<pre>FLUSH PRIVILEGES;<\/pre>\n<\/li>\n<li>g.) Exit Mysql sell\n<pre>exit<\/pre>\n<\/li>\n<\/ul>\n<p>2.) Download WordPress and setup the configuration.<\/p>\n<ul>\n<li>Download the latest wordpress:\n<pre>wget http:\/\/wordpress.org\/latest.tar.gz<\/pre>\n<p>Then extract:<\/p>\n<pre>tar -xzvf latest.tar.gz<\/pre>\n<\/li>\n<li>Copy the sample configuration file to make a backup.\n<pre>cd wordpress &amp;&amp; cp wp-config-sample.php wp-config.php<\/pre>\n<\/li>\n<li>Edit the configuration file:\n<pre>vi wp-config.php<\/pre>\n<p>Press <b>I<\/b> to start editing, <b>Esc<\/b> to stop editing. Press <b>:<\/b>, then type <b>wq<\/b> to save and exit, type <b>q!<\/b> to exit without save.<\/p>\n<p>Then change the section of database-name, database-user, password-here.<\/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;database-name&#8217;);<\/p>\n<p>\/** MySQL database username *\/<br \/>\ndefine(&#8216;DB_USER&#8217;, &#8216;database-user&#8217;);<\/p>\n<p>\/** MySQL database password *\/<br \/>\ndefine(&#8216;DB_PASSWORD&#8217;, &#8216;password-here&#8217;);<\/p><\/blockquote>\n<\/li>\n<\/ul>\n<p>3.) Setup the permissions.<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>Give ownership of the directory to the apache or nginx user by running following commands one by one:<\/ul>\n<\/li>\n<\/ul>\n<pre>sudo rsync -avP ~\/wordpress\/ \/var\/www\/\r\ncd \/var\/www\/\r\nsudo chown www-data:www-data * -R \r\nsudo usermod -a -G www-data username<\/pre>\n<p>4.) Finally in your browser go to <i>IP or domain\/wp-admin\/install.php<\/i> and start installing.<\/p>\n<p>Enjoy!<\/p>","protected":false},"excerpt":{"rendered":"<p>Already installed LAMP or LEMP (Nginx with PHP, Mysql) on your Ubuntu Server? This time I&#8217;m going to show you how to install WordPress CMS. WordPress is a popular blogging tool and a content management system (CMS) based on PHP and MySQL. It&#8217;s free and open-source. To install WordPress, first login your Ubuntu Server as [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[152,153,15,158,31],"class_list":["post-179","post","type-post","status-publish","format-standard","hentry","category-ubuntu-server-2","tag-13-04","tag-ubuntu","tag-ubuntu-13-04","tag-wordpress","tag-wordpress-setup"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/179","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=179"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/179\/revisions"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}