How to install WordPress on Windows 7 to test themes and plugins offline

Download PDF

Testing a new theme or plugin for developing them or just for normal usage in server is risky. Just imagine the risk when we try a new plugin or modify the theme’s CSS file : there are always many visitors are surfing the website; it happens the plugin or the modification in CSS file was not done rightly and, as the WordPress guy says “sky will fall on your head” : it really happens. We upgraded to WordPress 3.1 without thinking, unfortunately, it has some compatibility issues (which is rare for WordPress) with older plugins. The total website was a mess for few hours.


Here are the steps to install WordPress on Windows 7 locally on the hard disk, so that you can test themes and plugins offfline. Follow each and every step very religiously so that you can say “Code is poetry”.


Download the light version of XAMPP (known as XAMPPlite). Download the exe file. It is around 63.5 mb. Now, double click the installer file to install. Keep everything at default settings, do not change anything :


How to install WordPress on Windows 7 to test themes and plugins offline



It will take around 15 minutes to get installed. From Start menu, click to start xampp control panel (or else, Go to the install folder, that is C:> xampplite and double-click the xampp-control.exe file).
Now, xampp control panel will open. Start up MySQL and Apache services one by one; Windows firewall will give you warning for Apache, accept it:


How to install WordPress on Windows 7 to test themes and plugins offline-1


Now, open your favorite browser, we recommend using Mozilla FireFox for this purpose. In the address bar type:


and press Enter key from keyboard. An introduction screen will open asking you to select the language, select English and you will arrive here:


How to install WordPress on Windows 7 to test themes and plugins offline-2


Now click on phpMyAdmin in the left column under Tools. We have placed the cursor over the option in above screen shot.
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:


How to install WordPress on Windows 7 to test themes and plugins offline-3


After few seconds, you will get the indication on the screen by a message saying “Database wordpress has been created.”


Now, we have to install WordPress. Download WordPress from and unzip it to C:\xampp\htdocs:


How to install WordPress on Windows 7 to test themes and plugins offline-4


Now the important part. wp-config-sample.php ; Open it with any text Editor like Notepad, But we prefer to use gedit. You have to Edit only the lines 19, 22 and 25, namely :


19 define(‘DB_NAME’, ‘database_name_here‘);

22 define(‘DB_USER’, ‘username_here‘);

25 define(‘DB_PASSWORD’, ‘password_here‘);


You need not to change this line :


28 define(‘DB_HOST’, ‘localhost‘);



Change the database_name_here, username_here, password_here to that you have copied in your Notepad. Save it. Close it, again open it and recheck if they are correct. Close it.

Now, rename that wp-config-sample.php to wp-config.php …done! We are ready to install WordPress.


Update : Thanks to our reader Kathryn (see the comments) for pointing it.


Go to http://localhost/wordpress/wp-admin/install.php from your bowser:


How to install WordPress on Windows 7 to test themes and plugins offline-6


Fill up the required fields and let WordPress allow few minutes to get installed. You will be able to log in and do anything you like to test. Here is our test blog:


How to install WordPress on Windows 7 to test themes and plugins offline-7



Searched Terms:

WordPress, test wordpress installation, test wordpress windows, testing different themes in same wordpress localhost

Here’s what we’ve got for you which might like :

Also, we have YouTube Videos and Apple iTunes Podcast Channel (the link will open iTunes App on Mac).

Additionally, performing a search on this website can help you.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Google+ or Twitter to join the conversation right now!

If you want to Advertise on our Article or want Business Partnership, you are invited to Contact us.

Contact Us


  1. says

    What a great collection of great articles in your site. I hope I can make something of that quality one day Congratulations!!. I’ve been looking for this info in many sites related to this subject until I found your site! Thanks!

  2. Thuso says

    Great and easy to use tutorial! I will be definately be using this method to install wordpress tonight!!!

  3. Kathryn says

    Thank you so much… this was very easy to follow and so helpful.

    there is one area though in the following line that might need clarification:

    define(‘DB_PASSWORD’, ”);

    The above character at the end should actually be an open and close parenthesis (after the comma) and even though it may seem that’s what it is, it’s actually a quotation mark. if you copy and paste this code with the quotation mark, it doesn’t work. However, if you type it into notepad as an open and closed quotations there is a bit more space and it’s clear what it is. Hope that helps someone else… once I made the change everything worked fine!

    So thank you!

  4. says

    Thank you very much Kathryn for the constructive input. It will really be helpful for others. We have edited it to make it more descriptive.

  5. Vidhi says

    Really helpful guideline…I was needed it and made successful installation. Thank you.

  6. says

    Yes, you can install multiple WordPress instances & apply different themes. In that way, you can check all the websites with various themes applied at the same time.
    Obviously you can install multiple themes on single WordPress installation. I guess this not what you want.
    You can do subdirectory installation of WP on localhost.