
This is Part 2 of a 2 part tutorial.
In Part 1 of this tutorial we showed you how to install XAMPP on your PC. In this tutorial we’ll show you how to get WordPress up and running.
First off, head over to WordPress.org and download the latest ZIP which is 3.0.4 at the time of this writing. After you have saved it somewhere on your hard drive we need to extract the contents of the ZIP. Personally, I prefer to use 7-Zip for this. 7-Zip is free and open source and is released under the GNU LGPL license.
Extract the contents of the ZIP to the htdocs folder which you will find at C:\xampp\htdocs All of your web projects will go in that folder. For example, if you want to install another package such as bbPress, Joomla, phpBB etc they all go in the htdocs folder. Think of it as the public_html folder on your host’s server. Once you have extracted the ZIP you will now have a folder named wordpress inside the htdocs directory.
As a sidenote, you can rename the wordpress folder to anything you want. If you’re like me and intend to run more than one instance of WordPress you’ll have to. I have my folders renamed as wp01, wp02 and so forth. If you want to go with just one instance of WordPress then just leave it as it is.
Now we can begin. In your browser navigate to http://localhost/phpmyadmin/ and log in. This is where we’ll create the database WordPress needs in order to function. Once you log in you’ll see the screen below,

In the screen above you’ll need to set a few things. Choose a name for your database. It doesn’t matter what it is, for the sake of simplicity I use database names like wp01, wp02 etc to coincide with my various WordPress installs. After you have entered the name of your database you need to set both the charset and collation – go with utf8_general_ci When you’re finished click on Create. You now have an empty database.
In the wordpress folder look for the wp-config-sample.php file and open it with a plain text editor like Notepad. The lines we will need to edit are,
define('DB_NAME', 'database_name_here');
define('DB_USER', 'username_here');
define('DB_PASSWORD', 'password_here');
In the first line you will enter the name of the database that you chose earlier. The second line is where you enter the username, it will be root. The third line is where you enter the database password. Using XAMPP the database password is the same password you use to log in to phpMyAdmin. Remember this paragraph from Part 1?
It is in the screen above that you can set your passwords. Referencing the image above, under the heading MYSQL SECTION: ROOT PASSWORD is the password you’ll need to access phpMyAdmin. Choose a password and enter it. Don’t forget that password because we’ll need it again later when we install WordPress. For the options entitled phpMyAdmin authentication and Set a random password for the phpMyAdmin user pma you can go with the defaults. If you want you can tick the box where it asks if you’d like to store your password in the directory shown. When you’re finished click on Password Changing.
Just for the sake of simplicity let’s say you chose wordpress as the database name and 1234 as the password. The username is the default root. The lines you need to edit should now look like this,
define('DB_NAME', 'wordpress');
define('DB_USER', 'root');
define('DB_PASSWORD', '1234');
That’s all you need to edit here. If you were installing WordPress on a live server than you would have to make further edits. You’d want to enter the various security keys in the following section,
define('AUTH_KEY', 'put your unique phrase here');
define('SECURE_AUTH_KEY', 'put your unique phrase here');
define('LOGGED_IN_KEY', 'put your unique phrase here');
define('NONCE_KEY', 'put your unique phrase here');
define('AUTH_SALT', 'put your unique phrase here');
define('SECURE_AUTH_SALT', 'put your unique phrase here');
define('LOGGED_IN_SALT', 'put your unique phrase here');
define('NONCE_SALT', 'put your unique phrase here');
You might even want to change the database prefix here,
$table_prefix = 'wp_';
Since this is localhost we don’t have to worry about any of that. When you’re finished with that file save it and rename it as wp-config.php
Now browse to http://localhost/wordpress/wp-admin/install.php and follow the onscreen instructions. Of course this assumes you haven’t renamed the wordpress folder. If you did then you would browse to http://localhost/YourRenamedFolder/wp-admin/install.php You will now be at the WordPress installation screen. See the image below. (click to enlarge)
In the screen above fill in the various details and click on Install WordPress. If all goes according to plan you will see a Success message with a log in button.

further reading:
http://codex.wordpress.org/Main_Page
Go to Part 1 of this tutorial.


Hey Len,
Some helpful information there!
Found your post by Googling and setting the limit to “within 24 hours”, as last time I researched this topic; the tutorial was for obsolete ⊕ outdated versions.
If you get the chance, could you also write a tutorial for setting up Question2Answer within WordPress on XAMPP?
[possible pt3 to this tutorial]
Thanks again for a great tutorial, keep bloggin’
,
Samuel
Couple of notes;
It failed when I edited the wp-config-sample.php directly.
When I deleted the wordpress folder then re-extracted from the downloaded archive, and did the setup without editing the file, it all worked.
I was able to make all the modifications you recommended (except the live-server stuff)
That’s odd, I’ve never seen it do that before. I always directly edit the wp-config.php file. You can use the built-in tool where WordPress will create the wp-config.php file but I didn’t cover that as it doesn’t always work.
Perhaps it was because I was using 0.0.1 version higher than you…
:S
Great tutorial,
Hi Kevin,
Thanks for the kind words. Incidentally, it’s ironic you should stop by as I briefly visited your site last night. You’ve got some great stuff there. I plan on revisiting later today when I have more time.
I really appreciate the very clear and short tutorial for both xampp and getting wordpress running on it!!!
I am very new to this but your tutorial helped enormously.
Best wishes!
You’re most welcome Bill. If you run in to any problems let me know.