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 :
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:
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:
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:
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 WordPress.org and unzip it to C:xampphtdocs:
Now the important part. But we prefer to use gedit. You have to Edit only the lines 19, 22 and 25, namely :; Open it with any text Editor like Notepad,
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 thatto …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:
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:
Tagged With how to get wordpress offline on windows , How to Test WordPress , test wordpress locally windows 7