How to Install WordPress on Apache Server (Ubuntu 15.10)

Thursday, March 31st 2016. | how to

#howto ,#tutorial #VPS – How to Install WordPress on Apache Server (Ubuntu 15.10) – This tutorial explains step by step guide (with pics) about How to Install WordPress on Apache Server (Ubuntu 15.10)

Looking a way to manually install WordPress on Apache based Ubuntu server / vps? Here’s the step by step tutorial (with pictures) for newbie. This article is part of “How to Set Up Full Apache Stack on Ubuntu 15.10.”

Requirements

  1. A SSH client like Bitvise or Putty and basic knowledge about how to use it.
  2. Basic knowledge about common Unix command to SSH to your server.
  3. A server or VPS with at least 256MB of RAM (OpenVZ) but 512MB is recommended if you are using KVM or Xen.
  4. Install Apache2, MariaDB mysql and PHP5 on your Ubuntu server.
  5. About 30 minutes of your time
  6. a cup of coffee or tea.

Confused on choosing which VPS provider to install VestaCP? Read my recommended VPS providers or top low end cloud server providers. Quick recommendation: Digital Ocean, Atlantic.net or Ramnode.

In this guide I am using a 512MB RAM Cloud VPS from Digital Ocean running Ubuntu 15.10 x64.

Do not forget to always replace doamin.tld with your own domain name.

Download WordPress Package

Step 1 – Login to your server as root or as a user with root privilege (sudo) :

setup apache 1

Step 2 – Go to your web directory :

cd /var/www/domain.tld/public_html

## example :
cd /var/www/servermom.xyz/public_html

Step 3 – Now download latest stable version of WordPress :

wget https://wordpress.org/latest.tar.gz

download wordpress to vps

Step 4 – Now extract the package keeping all the files inside that folder :

tar --strip-components=1 -xvf latest.tar.gz

extract wordpress package

Step 5 – Now verify that you get all the files. Also remove latest.tar.gz file since you no longer need it :

ls
rm latest.tar.gz

2016-03-31_202912

Step 6 – Change ownership of your web directory to www-data :

chown -R www-data:www-data /var/www/domain.tld/public_html

## example :
chown -R www-data:www-data /var/www/servermom.xyz/public_html

2016-03-31_203243

Install WordPress

Step 7 – Now open up your browser and access your website’s index.php file to start the installation. You’ll be then redirected to /wp-admin/setup-config.php, just click the Continue button:

2016-03-31_203348

Step 8 – Click the Let’s Go button in the next page.

2016-03-31_203510

Set Up Database

Step 9 – Open new browser tab and login to PhpMyAdmin via your server’s IP address :

http://x.x.x.x/phpmyadmin

login phpmyadmin

Step 10 – Click new MySQL database (see pic below) :

2016-03-31_203852

Step 11 – Go back to phpmyadmin homepage then create new database user.

2016-03-31_204036

Give it new username and password. Scroll down the page and click the go button.

2016-03-31_204233

Step 12 – You’ll be then redirected to another page. Click on database.

2016-03-31_204355

Select the database name you’ve created earlier (step 10) then click on Go button.

2016-03-31_213504

Tick the Check All option then continue by clicking the Go button. This will add all privileges of the database you choose to that specific user.

2016-03-31_213642

Finish The Installation

Step 13 – Go back to WordPress installation process. Now enter all the database credential you’ve just created :

2016-03-31_213958

Click on the Submit button.

Step 14 – Finally, click on the Install button to start the installation.

2016-03-31_214134

Step 15 – There are some details needed to finish the installation process. Do not forget to copy that complex password.

2016-03-31_214222

Hit the Install WordPress button.

Step 16 – Done. You can now login using your username and password.

2016-03-31_214433

Enable .htaccess Mod Rewrite

Step 1 – Go back to your server (Putty). Edit Apache configuration of your website (virtual hosts file) :

nano /etc/apache2/sites-available/domain.tld.conf

## example :
nano /etc/apache2/sites-available/servermom.xyz.conf

Step 2 – Now add these lines to that file :

<Directory /var/www/domain.tld/public_html>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
</Directory>

You can put it in either after <VirtualHost *:80> or before </VirtualHost>

example :

2016-03-31_215308

Save and exit Nano editor once done (Control+O then Control+X).

Step 3 – Now enable Apache2 mod rewrite module followed by restarting apache service.

a2enmod rewrite
service apache2 restart

2016-03-31_215753

Step 4 – Now you can try it. Login to WordPress and go to Settings >> Permalinks. Choose one of SEO friendly permalink format you want then save the change.

2016-03-31_220113

That’s it.

In conclusion, installing WordPress may be generally an easy task to do. It has simplest installation wizard. However, it may not be that easy for newbie who has never touched a Linux based VPS before. I hope this article helps you. Enjoy..

This post How to Install WordPress on Apache Server (Ubuntu 15.10) is part of ServerMom.

Source link