How to install Wordpress blog in your computer with XAMPP
Before I continue to answer the above title, I just would like to share with you WHY should we install Wordpress blog in our own computer:
- You can make it as a test blog. You can test your new theme and new plugin, without worrying on breaking your official blog in the webhosting server. I like to keep my hands dirty by playing with the theme editor. By having a locally hosted Wordpress blog, I can do almost anything with the theme.
- When you have your own Wordpress blog in your computer, you don’t have to be connected to the internet all the time to upload your blog in your browser from your webhosting server.
- You can make it as a back up blog. Make the locally hosted blog as a “mirror blog” which have all the plugins and themes of your official blog. If anything happens to your blog online, you have almost the same blog locally to count on.
- You can also make it as a personal diary, where none of the post that you wrote can be access by internet user.
- A good learning process on how servers are operated, and maybe you could also install other blogging platform and compare it with Wordpress.
- You don’t need to use FTP to transfer your files to the server.
- None of the software that you need to have Wordpress installed in your computer cost you anything. You just need some passion and a little bit of elbow grease to get the things going. So why not?
What do you need?
Basically you will need to transform your notebook/PC computer to be a server, and to be exact, an Apache server. You will need XAMPP to do the job.
XAMPP is an Apache distribution which contains MySQL, PHP and Perl. It is the best package that you could use to run Wordpress blog in your computer. You don’t have to be a geek to install XAMPP though, as it comes with a one-click Windows installer for you.
Don’t forget your Wordpress installer package.
Installation
XAMPP
Choose the latest stable distribution “XAMPP Windows Installer Version” from Apache Friends. Choosing other than the installer version will give you headache. Run the installer in your computer after successful download. Apache Friends have all the information on how to install XAMPP in your computer.
To make sure that you install XAMPP properly, open ‘CONTROL XAMPP SERVER PANEL’ from Start Menu > All Programs > apachefriends > xampp. Click ‘Admin…’ from the Apache service modules. It should open your browser and show this:
The URL address should be http://localhost/xampp/
Wordpress
Now we go into Wordpress installation. Installing Wordpress in our local server is a bit tricky. You won’t find public_html (which you usually have in remote servers) subdirectory in XAMPP server, as XAMPP use htdocs as their public_html subdirectory.
Follow the steps below:
- You need to first create a database for Wordpress by using phpMyAdmin as the manager. While you are on http://localhost/xampp/, choose “phpMyAdmin” in the left sidebar. Create a new database for your Wordpress, for example ‘wordpress’.
- Download and unzip your Wordpress folder and locate wp-config-sample.php. These are the exact details you need for XAMPP to work because the default user in phpmyadmin is called ‘root’ and there is no password.
*****
define(’DB_NAME’, ‘wordpress’); // The name of the database
define(’DB_USER’, ‘root’); // Your MySQL username
define(’DB_PASSWORD’, ”); // …and password
define(’DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value*****
Copy those details into your wp-config file, and save it as wp-config.php
- Now you need to copy the files to the right place. Locate htdocs folder in XAMPP. For example, I installed XAMPP inside my Program files folder. So, my htdocs folder would be in the C:/Program files/xampp/htdocs. Copy the whole WordPress folder into this directory.
- In your browser, go to http://localhost/wordpress/wp-admin/install.php and everything from there should run smoothly !

By that, XAMPP is sorted out by now.
I have been using Wordpress with XAMPP for the past few months, and found out that it is a good way to feel like a “webmaster” rather than just a “blogger”. XAMPP has become my server playground to test various types of PHP scripts for my websites and blogs, and getting my hands dirty with other blogging platforms.
By the way… Do you know that Wordpress is an Open Source project?
Happy webmastering!

September 6th, 2007 at 1:29 pm
Nice…lama suda cari tutorial ni..hehe. Nti sa kasi link p blog sa p ni post…
erm..klu movable type mcm mana??buli buat tutorial dia??
September 6th, 2007 at 2:58 pm
Movable? Sya pernah cuba before, tapi blum berjaya…
September 6th, 2007 at 3:03 pm
excellent guide
September 7th, 2007 at 8:33 am
Thanks ben!
September 23rd, 2007 at 3:54 am
I have followed these instructions and my wordpress site is now appearing from my local server. But…I have no idea how to use Filezilla client to upload files like a them. I do not know what ftp:// client address to type! Yikes, any helpers!
September 24th, 2007 at 9:34 am
There are 2 ways you can upload your files to the server:
1. Just uploads all your file using normal file transfer through Windows to “htdocs” folder, or
2. If you want to use FileZilla, you have to configure it like this:
“Host=localhost”
“Port=21″
“Server Type=FTP”
“Logontype=Normal”
And let other things to default.
Try connect to your server.
November 20th, 2007 at 1:30 am
Thanks.. one of best WP “quick” tutorials. Yes the best part is WP is open source… I’ve been in to open source for many years and belive in “use the force… read the source…”
We may have to encourage the WP users to read and understand the source…
December 23rd, 2007 at 8:51 pm
thanks for the great tutorial i got it working fine!
September 4th, 2008 at 5:08 pm
Hi.
I was hoping I could get things running smoothly with this guide and it was working well until the last bit. all i got at the end was this:
“Error establishing a database connection
This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at DB_HOST. This could mean your host’s database server is down.
* Are you sure you have the correct username and password?
* Are you sure that you have typed the correct hostname?
* Are you sure that the database server is running?
If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.”
i need help
October 7th, 2008 at 9:04 pm
Great blog. I like layout!!!!
November 13th, 2008 at 5:53 am
[...] OSSBlogger’s Installation Guide [...]
November 24th, 2008 at 4:59 pm
Hey, I was looking around for a while searching for port mirroring and I happened upon this site and your post regarding How to install Wordpress blog in your computer with XAMPP, I will definitely this to my port mirroring bookmarks!
December 1st, 2008 at 4:49 pm
thank you very much
December 1st, 2008 at 5:44 pm
wow thank