How to Install WordPress on Ubuntu

In this article i will show you how to install wordpress on Ubuntu(locally).

1. Create a database

2. Create a user

3. Assign all privilidges

4. copy wordpress folder to /var/www and make the user and grp as www:data

5. open browser and go to “http://localhost/wordpress”
For setting up wordpress, you will need:

1. Apache web server

2. PHP

3. MySQL

 


INSTALLING APACHE WEB SERVER


To install Apache, open “Accessories->Terminal” and type:

sudo apt-get install apache2

To confirm if installation went well, go to browser and type in address bar:

localhost

You should be getting a page saying “It Works”.

 


INSTALLING PHP


To install PHP, open “Accessories->Terminal” and type:

sudo apt-get install php5

Then you need to install a module called “php5-mysql”. To install type in “Terminal”

sudo apt-get install php5-mysql

This will install nessesory module required to connect PHP and MySql.

 


INSTALLING MySQL


I recommend you to install MySQL 5.1 instead of the latest MySQL 5.5. I had faced several issues with MySQL 5.5, So i suggest you to install MySQL 5.1.

 sudo apt-get install mysql-server-5.1

During the installation, you will get a prompt for setting up root password as shown below:

mysql-server-5-1-pwd-prompt

Now after the above installation finishes, open “Terminal” and type:

sudo mysql_install_db

sudo mysql_secure_installation

With the above command you will finish installing all the prerequisites of wordpress installation.

Leave a Reply

Your email address will not be published. Required fields are marked *