Setting Up WordPress On Your PC Using XAMPP
Having a local environment to test out new WordPress plugins or to develop and test your own themes before using them on your site is very beneficial and easy to set up. This tutorial will walk you through the step by step install of Xampp and WordPress on your pc including enabling mod-rewrite and configuring permalinks.
Download
You can download XAMPP here at SourceForge.net, the world’s largest Open Source software development web site. Make sure you download the windows version, either the installer or the .exe versions will work fine for a PC.
XAMPP is a very easy to install Apache Distribution for Linux, Solaris, Windows and Mac OS X. The package includes the Apache web server, MySQL, PHP, Perl, a FTP server and phpMyAdmin.
Install
After downloading and double-clicking on this file it will display a screen that asks you what language you would like to install, and then which folder you want to extract XAMPP to. I usually extract it to the My Documents folder on my C: drive so it's easier to get to. You can extract it to any folder that you like, but the root of your C: drive is the default. What you end up with are a bunch of files and folders under C:\xampp. The folder xampplite will be created for you.

Choose your install directory in Xampp
The beautiful thing about XAMPP is that it is self-contained and can be copied here and there, hard drive to hard drive without affecting the default install. So if you install it on your C: drive and want to move it to your F: drive, you can. All you have to do is run setup_xampp.bat after you’ve copied it over to your F: drive.
First Run
When you first run XAMPP you’ll need to do the following just once:
- Double-click on setup_xampp.bat – wait for the “press any key to continue…” and you’re done with the first step.
- Unlike what the readme says, I double-click on the file xampp-control.exe. There will be a window in the lower-right hand corner of your screen that will allow you to start the Apache web server software and the MySql database software.

XAMPP Control Panel with Apache and MySql running
Setting up the database
Next, you’ll want to follow the readme file. Start your web browser, type http://localhost in the address bar and hit enter. You should see a setup page that will guide you through setting up the database for your WordPress install.
- Select your language – English in this case.
- Click on menu selection phpMyAdmin on the left-side of the web page.
- Under “Create new database”, enter wordpress. This will be the name of your database in MySql
- Select utf8_unicode_ci for the collation. This is the last selection in my drop-down list.
- Click on the “Create” button. Your database will be created and a web page will display that.
Download and Configure WordPress
Once you’ve got your database setup, you can download WordPress here. You’ll need to unzip the contents to the directory your Xampp install is in, by default it is C:\xampp\htdocs folder.
Open the file C:\xampp\htdocs\wordpress\wp-config-sample.php in a text editor and change the following:
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wordpress');
/** MySQL database username */
define('DB_USER', 'root');
/** MySQL database password should be blank for Xampp */
define('DB_PASSWORD', '');
/** MySQL hostname */
define('DB_HOST', 'localhost');
Save this file as wp-config.php, make sure you don't save it as wp-config-sample.
Install WordPress
Back to your browser, type in http://localhost/wordpress/wp-admin/install.php, hit enter and you should see a WordPress install screen like the one below. Type in a blog title and provide your email address and click “Install WordPress”. The next screen will display your login and password. Make sure you remember the password it gives you, you are going to need it later after the install. Write this information down and click on “log in”.

Installing WordPress 2.8 on Xampp
Install Finished!
After logging in you’ll be at your “Dashboard”. The first thing you'll want to do is change the default password at the bottom of your user profile from the default one that was assigned by WordPress. In the sidebar, click on Users > Your Profile. Enter your new password twice and hit update profile.
Pretty Permalinks?
The second thing I always do but is not necessary, is change the way the default permalinks are displayed. Permalinks are the urls that wordpress displays in the address bar for links to the pages you publish. The default is http://www.yoursite/?p=123, but we want something a little more search engine friendly.
The first thing we have to do is make sure mod-rewrite is enabled in Xampp. To do this, go to the directory of your xampp installation\apache\conf and edit httpd.conf. Find (CTRL+F) the line which contains:
#LoadModule rewrite_module modules/mod_rewrite.so
and uncomment (delete the hash mark) it so it reads:
LoadModule rewrite_module modules/mod_rewrite.so
Next find (CTRL+F):
AllowOverride None
and change it so it reads:
AllowOverride All
Now that mod rewrite is enabled you can go into the sidebar and click on Settings > Permalinks and change your permalink structure to which ever option you would like.

Permalinks in WordPress
That's all there is to installing Xampp for use with WordPress on your local machine. Every time you want to use it just fire up the Xampp control panel and click the start buttons next to Apache and MySql, and when you're done simply click the stop buttons and shut down the control panel.














interesting stuff!
Thanks Thom!