Zealios[dot]Net

How-to : Wordpress on Your Ubuntu.

October 3rd, 2006 by idzuan

I decided to setup wordpress on my local machine for a backup and testing purpose. So here I’ll share with you How-to do it using Ubuntu.

First thing first you need to have Ubuntu installed on your machine first :) Here are the components that you need for wordpress setup : apache2-common, mysql-server, and libapache2-mod-php5. How to install all these components is to open Ubuntu Synaptic (System>Administration>Synaptic Package Manager) and search for needed component. Right click on component name and “Mark for installation”. Apply after you mark everything and wait until it finish install :)

Next step after you finish installed needed component are to setup and create mysql database. Below are the step for you to follow :

> su (comment : after you ’su’ you will be asking a password for root user)

> /etc/init.d/mysql start

> mysqladmin create wp_db -u root -p (comment: hit ‘Enter’ and insert your root password)

> mysql -u root -p (comment: hit ‘Enter’ and insert your root password)

> grant all privilileges on *.* to ‘root’@'localhost’ identified by ‘rootpassword’;

> grant all privileges on wp_db.* to ‘wpuser’@'localhost’ identified by ‘wpuserpassword’;

> quit

Ok..you done mysql part :) Next step is to download wordpress from wordpress.org and then extract downloaded file into Ubuntu directory, usually people extract into /var/www/ but I like to put it in user’s home directory. After extracted, you edit wp-config-sample.php. and save it as wp-config.php. Change all these parameter just like below (base on this example)

define(’DB_NAME’, ‘wp_db’);
define(’DB_USER’, ‘wpuser’);
define(’DB_PASSWORD’, ‘wpuserpassword’);
define(’DB_HOST’, ‘localhost’);

You need to do soft link if you didn’t putting wordpress in /var/www/.

> cd /var/www

> ln -s /home/user/wordpress wordpress (comment : /home/user/ is where you extract your wordpress)

Ok..now you can start apache

> apache2ctl start

Open your internet browser and type http://localhost/wordpress/. From here you just follow wordpress instruction :)

3 Responses to “How-to : Wordpress on Your Ubuntu.”

  1. aman Says:

    nice tutorial, can we try it using live cd

  2. idzuan Says:

    I’m not sure whether we can use Live CD to try or not. But to me its better for you to install Ubuntu for better experience :) You can do dual boot if you still want to keep your Windows. If you are not confident enought..you can install Linux in Virtual Machine :) Try it…. I also plan to write one post to guide people How-to do it. So wait k ;)

  3. HowTo:Run WordPress On Your Computer - Enblogopedia.com Says:

    […] UPDATE:Zealios update me with a great tutorial about “How-to : Wordpress on Your Ubuntu(Linux)” […]

Leave a Reply

Enter your email address: