Ad Space Available Wylly's Professional Travel Try DealDotCom Sexy Lingerie
How to Install WordPress Locally on Windows
Post Info Tuesday, July 24th, 2007 2:01 am by jdmacor Print Print this page

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

Like what you see? Then subscribe to our full feed or comments feed.

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

  1. Tara: Graphic Design BlogNo Gravatar

    HI, I would be interested in trying this, but mainly use mac, I don’t suppose there is an easy way to do this on a mac?

  2. J DavidNo Gravatar

    You know, I completely forgot about that! Here is a tutorial for macs. And I have clarified the title.

  3. Tara: Graphic Design BlogNo Gravatar

    Thanks I will take a look

  4. markNo Gravatar

    I use to do joomla sites before and i found http://www.uniformserver.com very useful to create local host, its quicker and faster than xamp

  5. JaypeeNo Gravatar

    Good stuff! I was planning to write something like but I never got the chance to sit down and start it. Anyways, I’m sure your post would have been better. Hehe :D

  6. DavidNo Gravatar

    Just wanted to let you know, If you just unzip the package to your root drive or to the root of a thumb drive you do not need to run the setup.

  7. EllieNo Gravatar

    I am going to try this install this weekend! I would love to be able to tweak everything before I use up loads of bandwidth refreshing LOL

  8. J DavidNo Gravatar

    @Jaypee: Nah. I am sure you could have handled. You have probably known about it longer than I have anyways.

    @Ellie: Yeah, that is a great reason to do it. I waste tons of bandwidth just re-uploading images and things that I have tweaked, over and over again. Let me know if you have any questions about the install.

  9. JaypeeNo Gravatar

    Yeah, I did know about this before but I never did get to write about it. Hehe :)

    Anyways, you seem to be very busy on other things coz you haven’t updated in a while.

  10. AlaingonzaNo Gravatar

    Niceee….thks!

  11. VamsiNo Gravatar

    Will definitely take a look at this. I think installing WordPress on local system and tweaking the theme before uploading is a good idea. Thanks for the light.

  12. Graphic Design Blog » Wordpress as a CMS - Content Management System

    [...] How to Install WordPress Locally on Windows J David Macor gives a step by step guide on how to get Wordpress running locally on a PC, ideal if you want to test your Wordpress website before releasing it publicly. [...]

  13. 5 Lessons I learned the hard way about Launching a Blog - Part 1 | Bloggercamp

    [...] Resources: Windows: How to Install WordPress Locally on Windows Apple OSX: Installing MAMP and WordPress Technorati Tags: blogging tips, Blogging Tips and Tricks, [...]

  14. 2 Lessons I learned the hard way about Launching a Blog - Part 1 | Bloggercamp

    [...] Resources: Windows: How to Install WordPress Locally on Windows Apple OSX: Installing MAMP and WordPress Technorati Tags: blogging tips, Blogging Tips and Tricks, [...]

  15. jameswillisisthebestNo Gravatar

    This is my first post
    just saying HI

  16. SNo Gravatar

    Very cool, works like a charm; many thanks!

  17. WordPress Theme Building Resources | J David Macor.com

    [...] How To Install WordPress Locally On Windows - You need to have a local install to build themes. [...]

  18. JonNo Gravatar

    Brilliant! Thank you for this. Worked like a dream…

    I have looked into this before and always ran into problems. This was too easy.

    Cheers!

  19. kitapNo Gravatar

    I am going to try this install this weekend! I would love to be able to tweak everything before I use up loads of bandwidth refreshing LOL

  20. Nathan ChapmanNo Gravatar

    Nice tutorial, here’s also a visual version if people want to see it (swf tutorial):
    Flash Tutorial

  21. FlorenceNo Gravatar

    Straight forward, Easy to follow - Best Tutorial Ever! Thank you :)

  22. BrunoNo Gravatar

    Thank you! Thank you! Thank you!

  23. WoodyNo Gravatar

    Great Tutorial. I’ve being wanting to test some sites beore going live. This saves me a heap of time!

    Great Work

    Just a quick question, if I was happy with what was created locally, is it just a matter of installing WP on your server then copying the folders accross for it to go live?

  24. n00bie Challenge - Page 6 - WickedFire - Affiliate Marketing Forum - Internet Marketing Webmaster SEO Forum

    [...] sure if would be of interest to you guys but I found this tutorial on how to install WP locally How to Install WordPress Locally on Windows | J David Macor.com I’ve just done it, very very easy to install. Thought it would save on bandwidth etc. during [...]

  25. Whatever-ishereNo Gravatar

    thanks for the GREAT post! Very useful…

  26. AndyNo Gravatar

    Hey!

    That worked a treat! I tried doing this install from a tutorial on another site and it just didn’t work time and time again - It took me about a minute with your instructions from booting xamp to the login page of wordpress local.

    Fantastic! you just made life 10X easier!

  27. Be Careful Editing Your Blogs CSS

    [...] before publishing to the web. If you use WordPress, there are solutions on doing this for Windows here and on a Mac [...]

  28. Buffer Dump 27DEC07 « Feet up, eyes closed, head back

    [...] How to Install WordPress Locally on Windows J David Macor gives a step by step guide on how to get Wordpress running locally on a PC, ideal if you want to test your Wordpress website before releasing it publicly. [...]

  29. Nathan ChapmanNo Gravatar

    @Woody:
    Yes Woody. If you were happy with the theme you created, you could install Wordpress on your server, then copy the theme files over.
    Easy, isn’t it?

    Nathan

  30. oktay ustaNo Gravatar

    thanks good article

  31. e-egitimNo Gravatar

    of course if you start your own chain no body is going to stop you though.

  32. perdeNo Gravatar

    thanks good article of course

  33. ask siirleriNo Gravatar

    thank you

  34. kitap özetleriNo Gravatar

    thanx

  35. GreatVideosOnlineNo Gravatar

    hi..

    great article.. always love wordpress.. now working on new CMS project using wordpress.. i will try this method..

    thanks..

  36. Avea müzikNo Gravatar

    thanks

  37. DeviantBlog » Blog Archive » Oh the possiblites

    [...] How to Install WordPress Locally on Windows | J David Macor.com [...]

  38. bryantNo Gravatar

    Thank you for this article. I can practice using wordpress without any internet connection. That is a really big help.

    But, I have a question about what to do next. After I am done practicing and I want to upload my final wordpress design to the server, what should I do?

    Thanks

  39. JayNo Gravatar

    Thank you so much for this tutorial. I am decently computer savvy, but networking and programming are definitely my achilles heel and I’m wanting to work out the bugs in the Wordpress design and process before uploading to a server, so I’m so glad I’m able to do the work locally rather than on the internet for everyone to see my bumbling!

  40. film indirNo Gravatar

    tkans..

  41. film indirNo Gravatar

    tkans

  42. film izleNo Gravatar

    tkans you harika..

  43. installing wordpress on PC video tutorial | tech blog

    [...] here is the detail step by step guide for the installation [...]

  44. nusaaNo Gravatar

    I’m sorry, I’m noob in that stuff, but anyway, link http://localhost/xampp/splash.php for creating new database does not open to me. What should I do?

  45. Asif MomenNo Gravatar

    Great Tutorial

  46. How To Install WordpressNo Gravatar

    Very nice post :)
    However, I’ve written an ebook on this subject that I’m going to give for free to interested people.

  47. Link: Web Design Tools « O m n i f u s i o n

    [...] WordPress Help - installing WordPress locally WordPressMax - Cheap install service [...]

  48. Installing Wordpress 2.2.6 locally under Windows: Ahad Bokhari

    [...] http://www.jdavidmacor.com/2007/07/24/how-to-install-wordpress-locally/ [...]

  49. Installing Wordpress 2.2.6 locally under Windows: Ahad Bokhari

    [...] David Macor [...]

  50. Jatin V MeshiyaNo Gravatar

    this is a good try but you can try some pictorial views also!

  51. Shane SwingNo Gravatar

    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

  52. Ree @ Prodiet TipsNo Gravatar

    I would tell it it was not so difficult

  53. dawsogNo Gravatar

    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.

  54. How to modify a WordPress theme/css (for beginners) -- flisterz:blog

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

  55. evileyebobNo Gravatar

    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.

  56. himNo Gravatar

    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!!!

  57. ArebasNo Gravatar

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

  58. EdNo Gravatar

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

  59. A_FlamaNo Gravatar

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

  60. Ali HussainNo Gravatar

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

  61. justinNo Gravatar

    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.

  62. Mr.PlaneNo Gravatar

    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?

  63. JosefusNo Gravatar

    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

  64. Para PemulaNo Gravatar

    how about upgrading the wp automatically

  65. TventsNo Gravatar

    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.

  66. vivekNo Gravatar

    very precise and very useful.

    Regards

Leave a Reply