Pages Menu
TwitterRss
Categories Menu

Posted by on Feb 17, 2008 in wordpress | 10 comments

Install WordPress on your Windows Machine

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…

Download WAMP

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:

The icon when WampServer is running

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:

phpMyAdmin option on the WampServer meny

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:

using phpMyAdmin to create a database and user for WordPress

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:

using phpMyAdmin to create a database and user for WordPress - 2

If this was successful, you should see the following screen:

using phpMyAdmin to create a database and user for WordPress - 3

Download WordPress

Now that your Database is setup, you just need a copy of WordPress to install. You could either download a test version of WordPress 2.5, or download the latest stable version of WordPress.

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“.

Install 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:

http://localhost/wordpress25

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):

WordPress Installation Screen

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:

Successful WordPress Installation 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!

UPDATE:

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.

Another Update:

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

10 Comments

  1. Hi Ben,

    Thanks for the comment. I’m glad somebody found it useful.

  2. Interesting post, never thought about installing wordpress on my desptop. Makes it a whole lot easier to test plugins and themes.

  3. Hi Tarun. That is quite freaky. And like I said, I’m sure there are quite a few tutorials out there.

    Just didn’t realise written on the same day 😀

  4. Hi James

    I have followed exactly what you said we should do but my browser is stick after I click ‘Install WordPress’. It just stays on that page and says its loading but never goes onto the page that shows the password etc. What am I doing wrong?

    Dave

  5. Hi Dave

    What browser are you using? (Not that this should make a difference)

    And, can you tell if the database tables are being created? You can take a look using the phpMyAdmin tool…

  6. Thank you for this tutorial! It turned out really usefull to me (only I had problem finding the “Add New User” button, but luckily, I located it under “privilliges”.

    I am a WordPress Newbie, and have bookmarked your page in case anything as helpfull as this comes along.

    Now that I have successfully installed WordPress locally, more question come up.
    Like: I not sure if (and how) I can integrate my own design as I am not willing to use any ready-made templates. Also, once I am satisfied with the results, how do I go around publishing my blog online? That’s not clear to me…
    (now, don’t laugh, like I said I am Newbie, and I started reading about WordPress just yesterday..)

    Would you be so kind to give me some tips, or links for that matter regarding the issues? I’d appreciate that really.

    Thanks in advance & all the best,
    Mary

  7. Please allow me to share this video tutorial on Installing WordPress locally with your audience.

  8. Thanks Shane. It’s a GREAT video. I’ve embedded it in the post, if you don’t mind…

Trackbacks/Pingbacks

  1. Try out WordPress 2.5 : musings - [...] I’ve written a tutorial on installing WordPress on your Windows Machine. Go check it out! « «…
  2. What you can do with WordPress : geniosity musings - [...] response to a few questions by Mary on my post about using WAMP to install WordPress on your Windows…

Post a Reply

Your email address will not be published. Required fields are marked *

Pin It on Pinterest

Shares
Share This