How To: Install WordPress on Windows


When it comes to developing themes and plugins, you need the right tools to finish the job quickly and efficiently. There are a plethora of tools to choose from, and your selection can vary by personal taste. Some go for open-source tools like GIMP and Nvu, whereas others stick with trusted commercial applications like the omni-present Adobe Photoshop and Macromedia Dreamweaver. Whatever your choice maybe, it is essential that you like it and stick with it.


Testing your themes and plugins can be a big head ache, as you have to reload the page every time, consuming bandwidth. Bandwidth is precious, unless you own a dedicated server at MediaTemple or something(!). Also, any edit has to be uploaded before previewing. This gets tiresome, and you would have wondered whether there is an easier way.

Linux users have the LAMPP(Linux, Apache, MySQL, PHP), which is easy, but Windows users are mostly unaware of a similar package. It is called XAMPP(Apache, MySQL, PHP). Once you install it, you can setup WordPress locally, and test your plugins/themes/hacks offline. You save bandwidth, effort and time.


Here are the steps for installing WordPress locally:

  • Download the lite version of XAMPP, called XAMPPlite Choose the .exe version.
  • Install it at a partition of your choice. Here, we are using C drive.
  • Go to the install folder, that is C:xampplite. Double-click the xampp-control.exe file, and start up MySQL and Apache services in the dialog box that follows.
  • Go to http://localhost/ in your browser. From the left column, choose your language.
  • Click on phpMyAdmin in the left column(see image below).

    XAMPP screen

  • In the “Create New Database” Field, enter “wordpress” (without quotes), and select utf8_unicode_ci in the drop down box in the next field. Click Create. XAMPP setup is now complete.
  • Download WordPress.
  • Unzip it to C:xampplitehtdocs
    You should have a wordpress folder in htdocs. Go to it, and open up wp-config-sample.php.
  • You will see a list of default values. Change them to below(do not copy-paste this, just find the required info and update the file):
    define('DB_NAME', 'wordpress'); // The name of the database
    define('DB_USER', 'root'); // Your MySQL username
    define('DB_PASSWORD', ''); // ...and password (needs to be empty, just for local install)

    Rename the file as wp-config.php and save it.

  • Go to http://localhost/wordpress/wp-admin/install.php in your browser, and follow the steps.

You’re done. Now, use the wordpress folder as you would on your webserver, and upload the plugins, themes etc. to test. I recommend doing this before attempting a manual install in your server ( if it doesn’t have one-click installer). Now, go and test to your heart’s content πŸ˜€ I am having a great time testing, and the instant page loads of my dummy blog looks great.


  1. Hi,
    I have done exactly what you said and it works perfectly. The issue I am having is due to the fact that I want to use my current sql database instead of the tables created by a new installation of wordpress. So I have dropped these tables and imported my sql tables. The problem is that when I try to login it keeps tryin to reach my domain , it does not know that it should take the files from the hard drive. Practically I want my blog to be live on my hard drive so I can see the changes in real time…Please advise

  2. Good Morning,

    I have installed XAMPP into the directory of C:\xampplite and then installed WordPress into that directory as instructed. When I browse to http://localhost/wordpress/wp-admin/install.php

    I get the following error,
    Object not found!
    The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

    If you think this is a server error, please contact the webmaster.

    Error 404
    01/11/11 09:12:14

    What am I missing?

  3. I m using linux o/s…(OpenSuse11.3)…
    i copied the unzipped wordpress directory to /srv/www
    now when i m running the install.php on browser(http://localhost/wordpress/wp-admin/install.php) i m getting following error…

    Object not found!

    The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

    If you think this is a server error, please contact the webmaster.
    Error 404
    Wed Jan 5 15:39:21 2011
    Apache/2.2.15 (Linux/SUSE)

    need help immediately…

  4. Right now I am using NetServer, but your tutorial has tempted me to install XAMPP as well. If things get sticky with one, I intend to use the other.

  5. Hey guys,

    I was able to figure out the problem. Uninstall WordPress to C:\xampplite\htdocs <— there is a typo in the instructions.



  6. Hi,

    I’m getting an ‘Object not found’ error when i go to “http://localhost/wordpress/wp-admin/install.php”.

    I’m not sure why this is happening because I’m able to load the XAMPP (http://localhost/xampp/) page without a problem.

    Can anyone help?


  7. If you have got http://bsd/wordpress working, then you only have to move the WordPress files to the root (instead of in a folder called wordpress/) to get it running the way you want.

  8. Gd’ Day Bloggers… I have XAMPP installed and working with WordPress on my company Intranet however I would like to streamline the URL for the users. I’d like for them to type http://bsd and have it resolve to the WordPress installation without typing in anything else. I’ve tried changing/adding a Virtual Host in the appropriate “conf” file with no luck, I still have to type http://bsd/wordpress to resolve to the site. ANy suggestions on how to fix this? Thanks in Advance.

  9. Hi All

    I see Sumesh is the geek here. I use wamp.
    Afiliasi, check your firewall settings – that is the no. 1 reason for slowing down. Allow all privileges.

  10. If you have external scripts (ads, for example) in the template, each page load would be delayed because of that.

  11. I have installed XAMP on my pc.
    Sometimes its take a long time until the sites is open.
    Would you tell why this happen?

  12. @Rennie: The instructions here are for the smallest XAMPP package, that is XAMPPlite. Hence, these steps may not work for the full version of XAMPP.

  13. Read your tutorial and followed the steps. When inputting the link: http://localhost/wordpress/wp-admin/install.php all I get is a box with an error message “Error establishing a database connection and then a bunch of options of what it could be.
    I’ve been over the instructions with a fine tooth comb, xammp is running (I’m using the full version if that makes a difference), I can get into MySQL etc.etc.

    Any suggestions what the deal could be? Really appreciate your help.
    Thanks, Rennie

  14. Awesome instructions! I am so happy I can now test WP on my local machine now.

  15. Hello..
    I got an error…
    It says that CanÒ€ℒt select database

    We were able to connect to the database server (which means your username and password is okay) but not able to select the wordpress database.

    Anyone cah help me?

  16. hi sumesh,
    i don’t know abc’s of s/w…i just wanted to have a new theme for my blog in wordpress.
    i did everything mentioned here and was able to look at the theme that i wanted locally, but i don’t have any clue how to have that theme in my wordpress blog.
    can u please help me? i know i am dumb…hope u help me.


  17. Duh…LOL, it does make sense now you mentioned it. Naturally it is all stored locally so it would be there. Oh man, sometimes I don’t see the trees in the forest.

    Thanks Sumesh πŸ˜‰


  18. @Monika: Its all easy, and you’d feel it funny that it has been under your nose all the while. Assuming that your wordpress folder is x(usually C)x:\xampplite\htdocs\wordpress\wp-content is the folder which contains plugins, themes and uploads folders. Then, just put the themes/plugins to their respective directories, like on the real server. No FTP, just Windows Explorer (or its Mac equivalent).

  19. Hi Sumesh,

    I have gotten as far as installing everything as instructed. :-) It wasn’t as hard as expected as I’m no tech geek. But now I’m stuck. How can I upload new themes and stuff via FTP? I don’t know the path and the user and password I need to use here.

    I’m only familiar with FTP and have no idea on how to use mySQL to upload stuff. Could you please point me in the right direction? Once I can figure out the right path with FTP (I use SmartFTP) I will be fine.


  20. @Monika: Don’t mess around online, and especially not on your live blog. This method is much better, and many use it for theme/plugin development. And thanks for the stumble.

  21. Hi Sumesh,

    I also wasn’t aware that we can do this. And here I am trying to mess around while online. Oh …the silly me. :-) Bookmarked and stumbled!

    Thank you


  22. @Mitra: That’s got me stumped. I’ve installed XAMPP+WP on two different computers, and nothing’s wrong. Are you sure you did not turn off any services?(Start>Run>msconfig, and click enter, you’ll get a window, click Services tab, and enable all services, restart and try again)

  23. Nice tut..Sumesh. I came across this one as I was looking for a more specific solution. I was able to do everything you have mentioned in the tut and wordpress was installed, up and running the first time. But once I shutdown the pc and restart it a while later, i was unable to logon via a login page i had bookmarked.

    I tried running the setup.bat once more and it kept saying:
    Sorry cannot find php.cli
    Must abort these process!

    When i open xampp_start: could not open default file – mysql\bin\my.cnf

    I am not sure whats wrong or how to fix it. Any pointers?

  24. @JoLynn: Yes, it is sensible to do testing in a local setup that is fast, and has no consequences when we mess it up. WAMP is cool – I read about installing it in a post by Ben Bleikamp(ProBlogger’s designer). As for not getting time, you’re not alone – count me in too!

  25. Great post, I’ve often wondered why more bloggers don’t install locally to do testing, theme modifications, etc. I use WAMP and my only problem is finding the time to do more work/testing on my local install so that I can change my live site! πŸ˜‰

  26. @Syahid: Thanks for the link – I went through it. Its nice for show-off and ego boosting, but for now I find this method the easiest – easier than EasyPHP/direct method.

  27. @Myo: I saw your tut, though its a bit long. For now, I prefer XAMPP.

    @MDB: Thanks, and glad that this tut could be of help.

    @Madhur: Thanks.

  28. Wow! Never thought about or even realized that you could do this. What a great idea and well described. Will put it on my to do list after I have slimmed down all the junk on my hard drive.

  29. Great Tutorial Buddy . Currently i use EasyPHP for this purpose . It is a cool way to test your themes and plugins .

  30. @Nirmal: Thanks, hope you’re having a blast using it πŸ˜€

    @Andy: No, localhost(which corresponds to http://127.000.001/) is the local IP of your computer. It does not have to be changed, unless of course, you are using a live server. As for ideas, well, try again πŸ˜€ Maybe you missed a step.

  31. Having trouble with establishing a connection with the database. After http://localhost/wordpress/wp-admin/install.php

    Have you missed out a step?
    define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value

    I have set up WP on a live server before so I haven’t miscalulated my ability to edit the config file, so any ideas what is missing? Any help is appreaciated, as I’m setting this up to learn how to create themes!

  32. Nice tutorial, especially if you want to test themes and plugins locally before installing on server.

  33. @Haris: Thanks, and glad you liked it – I feel happy and believe it is worth the time spent, only when I get comments rolling.

  34. Great tutorial! I don’t use XAMPP. I use NetServer, but still I have XAMPP in my PC in case I mess up with NetServer.

  35. @Shankar: Thanks. And yes, this is for newbies. I expect most of you to have this already.

    @Linu: Do try – it’ll make developing themes easier.

    @Deepak: Thanks. I guess, I forgot it. Am editing it now.

  36. You missed one step…
    You have to rename wp-config-sample.php to wp-config.php

    BTW, I think LAMPP and XAMPP are one and the same, except L is for Linux and X is for XP. :)

  37. Great tutorial man. I’ve already set this up on my local PC and loaded contents from my hosted blog on to this.. so I can get the exact environment I need when I’ve to test plugins πŸ˜€

Comments are closed.