{"id":12852,"date":"2019-03-28T23:52:01","date_gmt":"2019-03-28T23:52:01","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=12852"},"modified":"2019-03-28T23:52:01","modified_gmt":"2019-03-28T23:52:01","slug":"how-to-install-wordpress-5-on-ubuntu-16-10-16-04-using-lamp-stack","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/28\/how-to-install-wordpress-5-on-ubuntu-16-10-16-04-using-lamp-stack\/","title":{"rendered":"How to Install WordPress 5 On Ubuntu 16.10\/16.04 Using LAMP Stack"},"content":{"rendered":"<p>For those who cannot afford the hustles of developing websites from scratch, there are now several content management systems (CMSs) such as\u00a0<strong>WordPress<\/strong>\u00a0that you can take advantage of to setup blogs as well as complete websites with a few clicks.<\/p>\n<p><strong>WordPress<\/strong>\u00a0is a powerful, free and open-source, highly pluggable and customizable CMS that is being used by millions around the world to run blogs and fully functional websites.<\/p>\n<p>It is easy to install and learn, especially for persons who do not have prior website design and development knowledge. With millions of\u00a0<a href=\"https:\/\/themeforest.net\/?ref=tecmint\" target=\"_blank\" rel=\"nofollow noopener\">plugins and themes available<\/a>, developed by an active and dedicated community of fellow users and developers, that you can utilize to tailor your blog or website to work and look just the way you want.<\/p>\n<p><b>Suggested Read:<\/b>\u00a0<a href=\"https:\/\/www.tecmint.com\/install-wordpress-lamp-postfix-mail-notifications-vps-server\/\" target=\"_blank\" rel=\"noopener\">How to Setup WordPress with LAMP + Postfix as Send-Only Mail Notifications<\/a><\/p>\n<h4>Requirements:<\/h4>\n<ol>\n<li>A dedicated VPS with a registered domain name, I suggest you to go for\u00a0<a href=\"https:\/\/www.bluehost.com\/track\/tecmint\/\" target=\"_blank\" rel=\"nofollow noopener\">Bluehost hosting<\/a>, which offers\u00a0<strong>50%<\/strong>off, one Free Domain name and Free SSL.<\/li>\n<\/ol>\n<p>In this post, we shall run through the various steps you can follow, to install the latest version of\u00a0<strong>WordPress 5.3<\/strong>on\u00a0<strong>Ubuntu 18.10-18.04<\/strong>,\u00a0<strong>Ubuntu 16.10-16.04<\/strong>\u00a0and\u00a0<strong>Linux Mint 18-19<\/strong>\u00a0with\u00a0<strong>LAMP<\/strong>\u00a0(<strong>Linux<\/strong>,\u00a0<strong>Apache<\/strong>,\u00a0<strong>MySQL<\/strong>\u00a0and\u00a0<strong>PHP<\/strong>) stack.<\/p>\n<h3>Install LAMP on Ubuntu and Linux Mint<\/h3>\n<p>First, we shall uncover the various steps for installation of\u00a0<strong>LAMP<\/strong>\u00a0stack before progressing to install\u00a0<strong>WordPress<\/strong>.<\/p>\n<h4>Step 1: Install Apache Web Server<\/h4>\n<p>To install\u00a0<strong>Apache<\/strong>\u00a0web server, issue the command below:<\/p>\n<pre>$ sudo apt-get install apache2 apache2-utils \r\n<\/pre>\n<p>We need to enable\u00a0<strong>Apache2<\/strong>\u00a0web server to start at system boot time, as well start the service as follows:<\/p>\n<pre>$ sudo systemctl enable apache2\r\n$ sudo systemctl start apache2\r\n<\/pre>\n<p>To test whether the server is running, open your web browser and enter\u00a0<code>http:\/\/server_address<\/code>. The Apache2 default index page will be displayed in case the web server is up and running.<\/p>\n<div id=\"attachment_22370\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/08\/Apache-Default-Page-Under-Ubuntu-16.04.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-22370\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/08\/Apache-Default-Page-Under-Ubuntu-16.04.png\" sizes=\"auto, (max-width: 976px) 100vw, 976px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/08\/Apache-Default-Page-Under-Ubuntu-16.04.png 976w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/08\/Apache-Default-Page-Under-Ubuntu-16.04-768x528.png 768w\" alt=\"Apache Default Page Under Ubuntu 16.04\" width=\"976\" height=\"671\" aria-describedby=\"caption-attachment-22370\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-22370\" class=\"wp-caption-text\">Apache Default Page Under Ubuntu 16.04<\/p>\n<\/div>\n<p><strong>Note<\/strong>: The Apache default root directory is\u00a0<strong>\/var\/www\/html<\/strong>, all your web files will be stored in this directory.<\/p>\n<h4>Step 2: Install MySQL Database Server<\/h4>\n<p>Next, we need to install\u00a0<strong>MySQL<\/strong>\u00a0database server by running the command below:<\/p>\n<pre>$ sudo apt-get install mysql-client mysql-server\r\n<\/pre>\n<p>If you want to install MariaDB, you can install it using following command.<\/p>\n<pre>$ sudo apt-get install mariadb-server mariadb-client\r\n<\/pre>\n<p>During the package installation, you will be prompted to set the\u00a0<strong>root<\/strong>\u00a0user password for\u00a0<strong>mysql<\/strong>\u00a0as seen in the image below. Choose a good and secure password, then hit the\u00a0<strong>OK<\/strong>\u00a0button twice to proceed further.<\/p>\n<div id=\"attachment_22371\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/08\/Set-MySQL-root-Password.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-22371\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/08\/Set-MySQL-root-Password.png\" alt=\"Set MySQL root Password\" width=\"721\" height=\"437\" aria-describedby=\"caption-attachment-22371\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-22371\" class=\"wp-caption-text\">Set MySQL root Password<\/p>\n<\/div>\n<p>The database server deployment is not yet secure, for this reason, issue the following command to harden it\u2019s security:<\/p>\n<pre>$ sudo mysql_secure_installation \r\n<\/pre>\n<p>Firstly, you will be asked to install the \u2018<strong>validate_password<\/strong>\u2019 plugin, so type in\u00a0<code>Y\/Yes<\/code>\u00a0and press\u00a0<strong>Enter<\/strong>, and also choose the default password strength level. On my system, I already installed it.<\/p>\n<p>Importantly, if you do not want to change the root password, then type\u00a0<code>N\/No<\/code>\u00a0when prompted to do so. Answer\u00a0<code>Y\/Yes<\/code>\u00a0for the rest of the subsequent questions.<\/p>\n<h4>Step 3: Install PHP and Modules<\/h4>\n<p>Last but not least, we shall install\u00a0<strong>PHP<\/strong>\u00a0and a few modules for it to work with the web and database servers using the command below:<\/p>\n<pre>$ sudo apt-get install php7.0 php7.0-mysql libapache2-mod-php7.0 php7.0-cli php7.0-cgi php7.0-gd  \r\n<\/pre>\n<p>Furthermore, to test if\u00a0<strong>php<\/strong>\u00a0is working in collaboration with the web server, we need to create a\u00a0<code>info.php<\/code>\u00a0file inside\u00a0<strong>\/var\/www\/html<\/strong>.<\/p>\n<pre>$ sudo vi \/var\/www\/html\/info.php\r\n<\/pre>\n<p>And paste the code below into the file, save it and exit.<\/p>\n<pre>&lt;?php \r\nphpinfo();\r\n?&gt;\r\n<\/pre>\n<p>When that is done, open your web browser and type in the this address\u00a0<code>http:\/\/server_address\/info.php<\/code>. You should be able to view the php info page below as a confirmation.<\/p>\n<div id=\"attachment_22373\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/08\/PHP-Information.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-22373\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/08\/PHP-Information.png\" sizes=\"auto, (max-width: 1003px) 100vw, 1003px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/08\/PHP-Information.png 1003w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/08\/PHP-Information-768x590.png 768w\" alt=\"PHP 7.0 Information\" width=\"1003\" height=\"771\" aria-describedby=\"caption-attachment-22373\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-22373\" class=\"wp-caption-text\">PHP 7.0 Information<\/p>\n<\/div>\n<h4>Step 4: Install WordPress CMS<\/h4>\n<p>Download the latest WordPress package and extract it by issuing the commands below on the terminal:<\/p>\n<pre>$ wget -c http:\/\/wordpress.org\/latest.tar.gz\r\n$ tar -xzvf latest.tar.gz<\/pre>\n<p>Then move the WordPress files from the extracted folder to the Apache default root directory,\u00a0<strong>\/var\/www\/html\/<\/strong>:<\/p>\n<pre>$ sudo rsync -av wordpress\/* \/var\/www\/html\/\r\n<\/pre>\n<p>Next, set the correct permissions on the website directory, that is give ownership of the WordPress files to the web server as follows:<\/p>\n<pre>$ sudo chown -R www-data:www-data \/var\/www\/html\/\r\n$ sudo chmod -R 755 \/var\/www\/html\/\r\n<\/pre>\n<h4>Step 5: Create WordPress Database<\/h4>\n<p>Execute the command below and provide the root user password, then hit\u00a0<strong>Enter<\/strong>\u00a0to move to the mysql shell:<\/p>\n<pre>$ mysql -u root -p \r\n<\/pre>\n<p>At the mysql shell, type the following commands, pressing\u00a0<strong>Enter<\/strong>\u00a0after each line of a mysql command. Remember to use your own, valid values for\u00a0<strong>database_name<\/strong>,\u00a0<strong>databaseuser<\/strong>, and also use a strong and secure password as\u00a0<strong>databaseuser_password<\/strong>:<\/p>\n<pre><strong>mysql&gt;<\/strong> CREATE DATABASE wp_myblog;\r\n<strong>mysql&gt;<\/strong> GRANT ALL PRIVILEGES ON wp_myblog.* TO 'your_username_here'@'localhost' IDENTIFIED BY 'your_chosen_password_here';\r\n<strong>mysql&gt;<\/strong> FLUSH PRIVILEGES;\r\n<strong>mysql&gt;<\/strong> EXIT;\r\n<\/pre>\n<p>Go the\u00a0<strong>\/var\/www\/html\/<\/strong>\u00a0directory and rename existing\u00a0<code>wp-config-sample.php<\/code>\u00a0to\u00a0<code>wp-config.php<\/code>:<\/p>\n<pre>$ sudo mv wp-config-sample.php wp-config.php\r\n<\/pre>\n<p>then update it with your database information under the MySQL settings section (refer to the highlighted boxes in the image below):<\/p>\n<pre>\/\/ ** MySQL settings - You can get this info from your web host ** \/\/\r\n\/** The name of the database for WordPress *\/\r\ndefine('DB_NAME', '<code>database_name_here<\/code>'); \/** MySQL database username *\/ define('DB_USER', '<code>username_here<\/code>'); \/** MySQL database password *\/ define('DB_PASSWORD', '<code>password_here<\/code>'); \/** MySQL hostname *\/ define('DB_HOST', '<code>localhost<\/code>'); \/** Database Charset to use in creating database tables. *\/ define('DB_CHARSET', '<code>utf8<\/code>'); \/** The Database Collate type. Don't change this if in doubt. *\/ define('DB_COLLATE', <code>''<\/code>);<\/pre>\n<div class=\"google-auto-placed ap_container\">\n<p>Afterwards, restart the web server and mysql service using the commands below:<\/p>\n<pre>$ sudo systemctl restart apache2.service \r\n$ sudo systemctl restart mysql.service \r\n<\/pre>\n<p>Open your web browser, then enter your server address:\u00a0<code>http:\/\/server-address<\/code>\u00a0to get the welcome page below. Read through the page and click on \u201c<strong>Let\u2019s go!<\/strong>\u201d to proceed further and fill all requested on screen information .<\/p>\n<div id=\"attachment_22375\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/08\/WordPress-Installation-Wizard.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-22375\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/08\/WordPress-Installation-Wizard.png\" sizes=\"auto, (max-width: 950px) 100vw, 950px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/08\/WordPress-Installation-Wizard.png 950w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2016\/08\/WordPress-Installation-Wizard-768x586.png 768w\" alt=\"WordPress Installation Wizard\" width=\"950\" height=\"725\" aria-describedby=\"caption-attachment-22375\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-22375\" class=\"wp-caption-text\">WordPress Installation Wizard<\/p>\n<\/div>\n<p>Hoping that everything went on just fine, you can now enjoy\u00a0<strong>WordPress<\/strong>\u00a0on your system. However, to express any concerns or ask questions concerning the steps above or even provide additional information that you think has not been included in this tutorial, you can use the feedback section below to get back to us.<\/p>\n<p><a style=\"font-size: 1rem;\" href=\"https:\/\/www.tecmint.com\/install-wordpress-on-ubuntu-16-04-with-lamp\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>For those who cannot afford the hustles of developing websites from scratch, there are now several content management systems (CMSs) such as\u00a0WordPress\u00a0that you can take advantage of to setup blogs as well as complete websites with a few clicks. WordPress\u00a0is a powerful, free and open-source, highly pluggable and customizable CMS that is being used by &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/28\/how-to-install-wordpress-5-on-ubuntu-16-10-16-04-using-lamp-stack\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to Install WordPress 5 On Ubuntu 16.10\/16.04 Using LAMP Stack&#8221;<\/span><\/a><\/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":[],"class_list":["post-12852","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12852","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=12852"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12852\/revisions"}],"predecessor-version":[{"id":12853,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12852\/revisions\/12853"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=12852"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=12852"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=12852"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}