Procedure to Install WordPress Locally on Windows 7, Vista and XP

Written By Sam on 27 September 2009
Advertisements

I had a plan of designing a WordPress Theme from very long time. Rather than using a live domain and your regular Webhosting, it is always a good idea to install WordPress on a local machine and try out things from there. It is not a big deal to install WordPress locally on your Windows 7 or Vista or XP machine.

Procedure to Install WordPress Locally

Step 1 : First thing you would need is Apache, MySQL and PHP. Instead of installing all the messy stuff you can just install XAMPP. XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use. Install XAMPP from here – http://www.apachefriends.org/en/xampp-windows.html#646.

Step 2 : Open the xampplite folder and double click setup_xampp.bat. Just follow the steps and install other components. Now double click on xampp-control.exe and start the Apache and MySQL services.

procedure-to-install-wordpress-locally-on-windows-7-vista-and-xp

Step 3 : So now You have got Apache and MySQL installed. Now we have to create a new database to use with our WordPress Blog. Head over to http://localhost/xampp and select your language. Now on the left side you can see a tools section. Just click on the phpMyAdmin link and create a new database from the phpMyAdmin page.

procedure-to-install-wordpress-on-local-computer

Step 4 : Now we have to install WordPress. Go to http://wordpress.org/download/ and download the latest stable version to your local computer. Extract the files and modify the wp-config-sample.php file with database name(techhaildb in my case), MySQL username(root in my case) and password (****** in my case). Rename the wp-config-sample.php file to wp-config.php.

procedure-to-install-wordpress-locally-on-windows-7

Step 5 : Now open the Xammplite folder and then copy the whole WordPress folder to htdocs folder. Now head over to http://localhost/wordpress/wp-admin/install.php and complete the WordPress Installation.

If ou have followed all the steps correctly you will have a WordPress blog installed on your local machine.

40 Responses to “Procedure to Install WordPress Locally on Windows 7, Vista and XP”

  1. Toni Zova says:

    Cheers for the tut mate, was wondering how id get WP running on my newly installed Win7 version…i had it setup to run on xp like 3 years ago but when I tried to do the same thing as I did back then, i failed miserably :) So yeah, cheers.

  2. iKRAM aDI says:

    Thanks for the tutorial. Saved me a lot of time!

  3. Hamed says:

    Hi tank for tutorial
    but I can’t run this program properly
    After starting XAMPP I clicked on apache start and nothing happened!
    same for mysql
    also installing service does not work anymore
    I’m using windows 7 Ultimate build 7600
    I had do exactly what you said.
    what is wrong?

    • Samrat P says:

      Im also running it on Windows 7 and it worked without any trouble. Are you running any other web services on those ports?? If not try un-installing them and retry again.. It should work without any trouble.

  4. GuerClelf says:

    Stunning blogpost, did not thought reading it was going to be so awesome when I looked at your title with link.

  5. Hans says:

    Hey, that was an awesome tutorial – I was trying another and it totally lost me…yours was extremely precise and thorough. Thanks – it’s running and now I can get into it…

  6. Thanks for the tutorial. I was searching for the same. Its a wonderful tutorial and steps are explained in a simple and easy way. Thanks again!

  7. wo says:

    Apache will not start locally with skype. turn off skype, start apache, turn on skype.

  8. Tzafrri says:

    I was able to install wordpress over Windows 7 (since I have IIS, I’ve installed Apache on port 9090).

    I was able to install wordpress and create posts. However, when I try to view the post, I cannot see anything.

    Any ideas?

  9. Dan says:

    WOW! A tutorial with excellent screen shots that actually worked. I’m new to WordPress, new to MySQL, Php, everything. Very well explained.

    So now that I’m about to start playing with a WordPress site on my own local PC, my next question will be how to upload it to my domain host. (I’m not there yet but I will be eventually)

    Thanks so much for getting me this far.

  10. Mark says:

    Dear Sirs,

    I have followed the above step by step and I have got stuck at step 4 where it says “modify the wp-config-sample.php file with database name”. I don’t know how to modify that file and therefore I can’t progress to step 5 and the conclusion of installing a wordpress blog on my local windows 7 laptop. Is it possible to more clearly explain the steps for “modifying the wp-config-sample.php file with database name”?

    Thanks,

    Mark

    • Samrat P says:

      Just open that particular file with notepad and edit the database name and password.

      • Mark says:

        What exactly do I put in for “password” in the file wp-config-sample.php? Do I put in 6 stars (as it your screenshot above) or do i put in a word of my choice? I was getting serious problems after final part of step 5. I need help.

      • Samrat P says:

        you need to put in the password of your database.

      • Mark says:

        what is the password of the database after I have created it? How do I find out because in setting up the database one is not asked to set a password.

      • Mark says:

        I have uninstalled and re-installed xampp and I am at the stage of creating the database using the address http://localhost/phpmyadmin/. at the foot of this page I see the following message: “Your configuration file contains settings (root with no password) that correspond to the default MySQL privileged account. Your MySQL server is running with this default, is open to intrusion, and you really should fix this security hole by setting a password for user ‘.root’.”

        What address or where do I go in localhost in order to follow the above instructions shown at the foot of http://localhost/phpmyadmin/? I think this will solve the problems at steps 4 & 5 that I am experiencing.

    • Mark says:

      When I first set up the database I am not asked to set a password. Therefore, how do I know what the password is in order to input it into the text of the file in notepad?

  11. Mark says:

    Hi,

    Thanks for the answer above but I need assistance with step 5. Can you email me using my email address so that I can send you back screenshots of what is appearing my my screen after i click “http://localhost/wordpress/wp-admin/install.php” above?

    Thanks,

    Mark

  12. Mark says:

    Hi,

    Any chance of getting answers to the questions I have put above following on from the reply saying “you need to put in the password of your database.”

    thanks,

    Mark

  13. J Heppy says:

    Step three tells me to ‘create a new database’ but doesn’t walk me through the process, I don’t know what to do here. Any help anyone?

    • Mark says:

      God, sounds familiar to my problems. I had to get an email directly to my inbox with a reply. I can send it onto you if you post up your email onsite. This posting to be honest with you is not very good.

  14. Mustang News says:

    Thanks for this, I have been looking around for a solution. This is perfect!

  15. Patty says:

    Excellent tutorial, this is a great ressource, thanks for writing this article!

  16. [...] Procedure to install wordpress locally on Windows 7 Vista XP Installing WordPress locally under Windows XP August 31st, 2010 in Uncategorized [...]

  17. Mike says:

    I am having trouble at the Xampp control panel step. When I click the start button for Apache in the control panel is comes back saying Apache service started but the Admin button does not light up. Is it possible this is because one of the ports Apache wants to use is already being used? If so how can I check? How can I fix this? Any input is appreciated! Thanks.

    • Mike says:

      When I run the port check, it says port 80 which is for the Apache HTTP is being used by “Process:System”. Could this be the problem?

    • Mike says:

      Now I am having trouble with step 5. I did everything up to and including step 4 but when I click on “http://localhost/wordpress/wp-admin/install.php” I get this error:

      Object not found!

      The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

      If you think this is a server error, please contact the webmaster.
      Error 404
      localhost
      09/16/10 12:01:02
      Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1

      • Mike says:

        Seemed to have fixed that, copied the wrong folder into xampp, but now I am getting an error saying:

        Error establishing a database connection

        This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.

        * Are you sure you have the correct username and password?
        * Are you sure that you have typed the correct hostname?
        * Are you sure that the database server is running?

        If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

        ————————————————————–
        But I filled out my wp-config file the same as the tutorial so I dont see why I would get this.

      • Mike says:

        Ok fixed that too! It works, awesome tutorial! I was just a retarded student :/

  18. [...] about how to go about getting this marvellous thing up and running, but the two I used were one and [...]

  19. isuru says:

    I have successfully install the worpress and after log in I’m getting this errors

    Warning: require_once(ABSPATHwp-admin/includes/bookmark.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\wordpress\wp-admin\admin.php on line 10

    Fatal error: require_once() [function.require]: Failed opening required ‘ABSPATHwp-admin/includes/bookmark.php’ (include_path=’.;C:\xampp\php\PEAR’) in C:\xampp\htdocs\wordpress\wp-admin\admin.php on line 10

  20. David says:

    I downloades de .sql file from my website, but when accessing my wordpress from //localhost/mysite links to pages are dead (or pointing to website). When I do click on them (after renaming http://www.mywebsite.com to localhost/mywebsite on the .sql file) i get send back to xampp startup page.
    Help please.

    Bests.

  21. Aman Singh says:

    Very easy tutorial. Took me 8 minutes to install on my local PC. Thanks for sharing the wonderful process step by step.

  22. dhiru says:

    hi can anyone tell me how to modify that .php file with daytabase name during installation

  23. palaru says:

    Hi,thanks good guidence
    i am using win 7 64bit
    completed all the steps but i am getting the below error kindly guide me to solve this issue

    Error establishing a database connection

    This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.
    •Are you sure you have the correct username and password?
    •Are you sure that you have typed the correct hostname?
    •Are you sure that the database server is running?

    If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

Leave your response!