Install WordPress on your Windows Machine
Whether you downloaded WordPress 2.5 or you would just like to test your theme or plugin on your own machine before uploading it to your site, I feel having an instance of WordPress running on your machine is a must.
Anyway, I’m sure there are quite a few tutorials for this out there, but I’ll write it here for my own reference, as well as yours…
WampServer, in short, lets you run a webserver and database (which obviously WordPress needs), on your Windows machine. If you’re lucky enough to be running Linux or an Apple OS, then you can skip this step.
So, anyway, go download WampServer, install it, and you can accept all the default installation settings.
It should install to “c:\wamp”, which makes things nice an easy. If it doesn’t install there, just make a note of where you DO install it…
Once it’s installed, start it by clicking the shortcut. You should see that it’s running by the icon in your task bar next to the time, as seen in the screen shot below:
Create a Database for WordPress
We’ll use phpMyAdmin for this step, which is a a Database (DB) admin tool that comes with WampServer.
Click on the icon that I showed you above and you should see the following menu:
Click the “phpMyAdmin” option to open the application up in a new browser window.
In the window that opens, click on the “Add a new User” link, as shown in the screen shot below:
On the next screen, in the section “Add a new User” fill in the following information:
1 – A user/database name, like “wordpress25” (without the quotes)
2 – Change the “drop down” to say local, and it should populate the field with the value “localhost”
3 – Choose a password for your user to access the database, like “wp25”
4 – Select “Create database with same name and grant all privileges”
5 – At the bottom of the page, click on “Go”
You can use the following screen shot for guidance:
If this was successful, you should see the following screen:
You can save it in the WAMP directory (see the first section of this page) in the “www” directory. For example: “C:\wamp\www”
Then, just unzip it. If you downloaded the WordPress 2.5 copy from this site, then there should be a directory called “wp25“, otherwise it will create a directory called “wordpress“.
Go into the directory, and edit the following file with notepad (or any text editor): “wp-config-sample.php“.
Replace the following “words” with the ones you used above in when creating the database:
putyourdbnamehere -> wordpress25
usernamehere -> wordpress25
yourpasswordhere -> wp25
If you look at the file, the 3 lines you changed should look like the following (I made the changes bold for ease of reference):
define(‘DB_NAME’, ‘wordpress25‘); // The name of the database
define(‘DB_USER’, ‘wordpress25‘); // Your MySQL username
define(‘DB_PASSWORD’, ‘wp25‘); // …and password
Then save the file as “wp-config.php“. Note that you took out “-sample” from the file name. You can do this by clicking on “File” then “Save As…” and taking out “-sample” from the file name.
Logging into your new WordPress Installation
In your browser, you will now go to the WordPress installation page by going to the following URL/link:
If you’ve been doing everything above while you read, then you should just be able to click the link and you’ll see the following screen (though the screen below is from a WordPress 2.3 installation):
Just enter a blog title, like “Local WordPress Test”, enter an email address (not that you will really need it to be real) and click on “Install WordPress”.
You should see the following screen:
And, you should have a working copy of WordPress on your Windows Machine.
Just a note, make sure you write down the password that you are shown (or change it straight away in the admin section of WordPress). You won’t be able to recover a lost password via email (without a bit more hard work)…
I really hope this has helped you in some way. If it has, let me know.
And, if you have any questions, let me know as well!
Shane left a link to his video on this process in the comments below. Here’s his video, which I think is excellent because of how thorough it is.
I was contacted by Hendry from blogbuildingu.com saying he had a tutorial for installing WP under nginx on your windows machine. Here’s what he had to say:
Recently, I’ve written a tutorial on how to install WP under Nginx, soon lighttpd and other options as well, including virtual machines.
The benefit is, nginx only takes 2MB of computer memory, which is much more friendly for desktop environment.
Go check out the article here: http://blogbuildingu.com/wordpress/install-wordpress-wemp