Welcome to the Digital Hub of J David Macor, a financial professional in Dallas, TX.

How to Install WordPress Locally on Windows


07.24.07 Posted in How To, Wordpress by jdmacor

An essential for any aspiring theme developer is a local install of WordPress. There are plenty of benefits to doing so and there are also pitfalls if you don’t. I will tell you about the pitfalls in a second, but before that, I want to tell you 5 great reasons why you should use a local install as your sandbox as opposed to installing a live version on some subdomain of yours:

Install WordPress Locally

  1. Works exactly like the real deal; plugins and all
  2. No need to mess with FTP programs
  3. Develop anywhere (no connection needed)
  4. Make sure your theme is compatible with latest version of WordPress
  5. Code in secret, then release with a bang

I can personally attest that the last reason is a good one. While working on the current theme for this website, I accidentally pinged Technorati, which notified a bunch of people of my latest work. When this site finally got released, it was more of a fizzle instead of a bang. Anyhow, let’s get on to the tutorial.

Install WordPress Locally

  1. Download and Extract XAMPP Lite

    1. Go to http://www.apachefriends.org/en/xampp-windows.html#646
    2. Download XAMPP Lite.exe (the .exe is a smaller, faster download)
    3. Move the download to the root of your C drive C:\
    4. Run the .exe and the directory will be installed
  2. Startup Apache and MySQL

    1. Open the xampplite folder
    2. Double click setup_xampp.bat
    3. After the program tells you to have fun, press any key on your keyboard
    4. Now double click on xampp-control.exe
    5. Now start the Apache and MySQL services
      Local Install 1
    6. If everything worked, you will see Running next to those 2 services
  3. Create a New Database

    1. In your browser of choice, navigate to http://localhost/xampp/splash.php
    2. Click on your language
    3. On the left hand side, under Tools, click phpMyAdmin
    4. On that page, you will see the MySQL heading, like in the screenshot below
      Local Install 2
    5. Call the database wordpress and select utf8 unicode ci from the drop down menu
    6. Click Create
  4. Install WordPress

    1. Download and extract WordPress to your desktop
    2. In the extracted folder, open the file wp-config-sample.php in a text editor
    3. Edit the file to look like this:
      define('DB_NAME', 'wordpress'); // The name of the database
      define('DB_USER', 'root'); // Your MySQL username
      define('DB_PASSWORD', ''); // ...and password
      define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value
    4. Save the file as wp-config.php
    5. Now open up the Xammplite folder on your C drive and then open the htdocs folder
    6. Copy the whole Wordpress folder here
    7. Finally, use your browser and navigate to http://localhost/wordpress/wp-admin/install.php

ENJOY YOUR LOCAL WORDPRESS INSTALL



121 Responses to “How to Install WordPress Locally on Windows”

  1. Shane Swing says:

    Nice tut. Although it’s for xampp, I found it useful.

    I created a video tut (although using wamp) that your audience might find useful, too.

    http://www.youtube.com/watch?v=biQWyBcYSX4

    Regards
    Shane

  2. I would tell it it was not so difficult

  3. dawsog says:

    Nice tutorial BUT IT DOESN’T WORK! It works OK until the last step #7. But when you type in http://localhost/wordpress/wp-admin/install.php into your web browser you don’t get the Wordpress install screen. Instead you will get a screen that says: 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.

  4. [...] rather than to rely on those sucky internet connection. Learn how to install Wordpress locally: Windows and [...]

  5. evileyebob says:

    Yo Dawsog I beg to differ but the article works step by step as written. You need to check your installation of xampp and then try again.

    It worked for me first attempt.

  6. him says:

    Wonderful and a superbly easy tutorial. was able to install and now having fun tweaking it locally!!! tho one question – how do i play around with 2-3 blog design at the same time? locally? all kinds of ideas wud be helpful!!!

  7. Arebas says:

    So helpful! Thank you so much. I was going insane with all the changes-saving and uploading…

  8. Ed says:

    my installing is stop when the browser show me this

    “Parse error: parse error in C:\xampplite\htdocs\wordpress\wp-config.php on line 28″

    what happen??

    Please help..

  9. A_Flama says:

    Great post!!!
    Everything went really smooth :)
    thanks!!!

  10. Ali Hussain says:

    I usally use WAMP 5. Easy to run and install.

  11. justin says:

    For vista users to save the C:\WINDOWS\system32\drivers\etc so you don’t get a wron path error when you add the line 127.0.0.1 myownserver.com and then try to save it you must do the following.

    Right mouse click note pad and select option to open notepad as administrator. OPen the path C:\WINDOWS\system32\drivers\etc (make sure you select to open all file types.

    Then add the line 27.0.0.1 myownserver.com

    The above line (myownserver.com) can be changed to whatever you want.

  12. Mr.Plane says:

    Thank you for this tutorial. I have tried many things but finally things worked out. Now I wonder where should I put the plugins and themes… HTDocs folder I guess?

  13. Josefus says:

    Great page and excellent instructions!

    Any reason why I could not do all this on a different drive than the C drive root? (I like to keep my C drive as lean as possible)…

    Thanks!
    J

  14. Para Pemula says:

    how about upgrading the wp automatically

  15. Tvents says:

    This is a good information. Word press is very common because many people choose it to use for their blogs. I already prepared my blog using word press. But I still have to learn much more about it.

  16. vivek says:

    very precise and very useful.

    Regards

  17. Georgina says:

    Best Info Yet re: Install Wordpress Locally
    Hello David
    This is the best information so far and I have read numerous webpages with instructions. Thank you so much.

  18. Brad says:

    Do appreciate these instructions very much. However, on Step 3 when I initiated “http://localhost/xampp/splash.php” on Firefox 3.0.11 or on IE6, all I could see was the main XAMPP logo. No language settings, tools or anything else to select. Apache and MySQL services are running. Ideas?
    Thanks!!

  19. used tires says:

    Sweet Guide! I was able to install wordpress locally on my machine without problems, it works flawless now, this is awesome!

    Till then,

    Jean

  20. awesome guide for using wordpress in a localhost configuration. thanks for sharing this. keep on the good work

  21. Phil says:

    Wonderful tutorial–works great and my wife is a very happy camper. Thanks!

  22. Matt says:

    Every step worked perfectly, took minutes to do. Great stuff.

  23. Imprezy says:

    Great tutorial. Thanks for sharing it!

  24. Jimmy says:

    Hi

    Thanks for this wonderful post. I tried everything, failed and came to see this post. followed it with no hope of getting it work and you know, rest is history. thanks

  25. Phil Miller says:

    Wow that was easy. Thanks for the visuals and simple instructions. One issue I ran into was I assumed I was supposed to create a password when making the changes to the config file. I figured it out and work perfect.

    Now to build a new site (locally) and replace my current Drupal site.

  26. Mob mesh says:

    Wow really very nice and good information you share here. I read your entire post and really superb information you share here on funny stuff thanks for your information.

  27. o2 mobiles says:

    it is a nice article and im a PHP programmer so i was aware of xampp before

    worth a try

  28. porno says:

    followed it with no hope of getting it work and you know, rest is history. thanks

  29. lia says:

    Thanks for such an easy to understand tutorial.

  30. Duncan says:

    Excellent tutorial, but I’ve hit a snag..

    When I run the wp-admin/install.php file it say’s that it has already been installed in displays really peculiarly. I haven’t installed it locally before and can’t seem to work out how I’ve done this..

  31. IanF says:

    I have successfully followed the install and everything works fine except if I try to access the web or blog pages from a pc on the LAN by substituting the ip address of the machine for “localhost” the main page loads without style sheet formatting and all subsequent pages are still referring to localhost based urls hence the remote pc cannot access them. Advice please?

  32. Generic says:

    I am pleased to hear this..

    Well Done!

  33. siki? izle says:

    thanks for all admin
    very good

  34. Evan says:

    worked a treat – thanks

  35. [...] For those who have Wordpress installed on their desktops (my favourite), simply "blog" offline first before uploading your posts online. This is pretty much like a dual-blogging mode. At least when you lost your online version, your desktop version is there, complete with your themes and posts. If you’re interested to know more on Installing Wordpress locally on your desktop, read more here. [...]

  36. Charles says:

    Excellent! Simple, clear, and complete. Up & running with no problems. Tried other instructions using xampp, but WP wouldn’t install. Thank you!

  37. sikis izle says:

    thanks for all admin
    very good

  38. I can’t find Wordpress to download! When I go to the download page, it says download from the choices on the right–but there are no choices on the right! I have a free Wordpress blog account, but no software. I wanted to get your plugins but don’t have the software to put them into it!

  39. Bleach says:

    Thank you so much for the tutorial

  40. Felix says:

    How can I install an EXISTING Wordpress Blog locally? I do not want to start a new one from scratch, but to administer my existing one

  41. john says:

    Thank you so much for the tutorial Works Great – Windows 7 64bit Pro

  42. izle says:

    thanks for it, its really great.

  43. Felix says:

    I need to administer the blog I already have, not a fresh install, that one I can easily do. Ahy help?

  44. Ovidiu says:

    Thank you for this. Is simple and straight forward. Everything anyone needs to know

  45. haytham says:

    hi i browsed your blog and it is very good.if you want exchange link with my blog i have nearly 100 visitors aday..
    my blog windows7downlods.co.cc

  46. WinkHealth says:

    Thank you so much for the tutorial

  47. ???? says:

    Thank you for this. Is simple and straight forward. Everything anyone needs to know

  48. youtube says:

    i did saw on other page. thanks alot.

Leave a Reply

Search
Categories
Other Places I Roam