fbpx

“WordPress started in 2003 with a single bit of code to enhance the typography of everyday writing and with fewer users than you can count on your fingers and toes. Since then it has grown to be the largest self-hosted blogging tool in the world, used on millions of sites and seen by tens of millions of people every day.”- People who created WordPress

Looking a way to manually install WordPress on Apache based Ubuntu server / vps? Here’s the step by step tutorial .

Absolute Requirement.

Install Apache2, MariaDB mysql and PHP5 on your Ubuntu server:

https://community.virtono.com/tutorial-how-to/set-up-a-lamp-stack-on-ubuntu-14-04/

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) :

 

Step 2 – Go to your web directory :

1

2

3

4

cd /var/www/domain.tld/public_html

 

## example :

cd /var/www/qwerty.xyz/public_html

Step 3 – Now download latest stable version of WordPress :

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

 

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

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

 

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

1

2

ls

rm latest.tar.gz

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

1

2

3

4

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

 

## example :

chown -R www-data:www-data /var/www/qwert.xyz/public_html

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:

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

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

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

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

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

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

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

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.

FINISH THE INSTALLATION

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

Click on the Submit button.

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

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

Hit the Install WordPress button.

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

ENABLE .HTACCESS MOD REWRITE

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

1

2

3

4

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

 

## example :

nano /etc/apache2/sites-available/qwerty.xyz.conf

Step 2 – Now add these lines to that file :

1

2

3

4

5

6

<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 :

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.

1

2

a2enmod rewrite

service apache2 restart

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.

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.

 

Categories: Tutorials

0 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.