Every Self-hosted WordPress user wonders “If there was a way via which WordPress could be installed offline and all the themes could be tested and corrected as per the requirements offline?” Yes! of course there are hundreds of ways to do this, but most of them are time-consuming and aren’t user friendly and it takes the users nerve to set up WordPress offline.
We have already looked into two other ways to use WordPress offline, and if you have missed it, you can quickly go through both of them:
There’s a post previously written on Shoutmeloud by Harsh, giving instructions to install WordPress offline using Wamp server, but after using Wamp, I felt it’s not as much user friendly as Xampp-Lite! So thought of helping you all out with the Xampp installation! Here’s a quick 5 minute (8 steps) procedure to Install WordPress Offline. In order to run WordPress offline, you need an Apache server and My SQL database(PhpMyAdmin) installed on your system.
How to Install WordPress for Offline usage using XAMPP
1) Download Xampp for Windows from the official website Apachefriends.org
2) Install Xampp with Apache and MySql services.
3) After the installation, run Xampp Control panel and start Apache and MySql services as indicated in the image below.
4) We need to configure MySql Databases, Open your web browser and go to http:://localhost.
Select the language of your choice and then go to http://localhost/security/index.php & there change MySql database password.
In this tutorial, I have given the password as test. (Password is case-sensitive)
5) Now we have to create MySql Database tables for your WordPress install.
To do this Go to http://localhost/phpmyadmin, Login using root as username and test as password, or the password which you gave in the previous step.
Create a new database through the PHPMyAdmin interface. Give a name for your database and don’t change any other setting (refer the Image below).
6) Now, download the latest version of WordPress from www.wordpress.org
After the download, go to the folder where you installed Xampp, there you will find a folder by name htdocs, open it and extract the latest version of WordPress there.
7) Open the WordPress folder (the one which you extracted in the above step), you will find a file by name wp-config-sample.php, open the file with notepad++ and edit the data as per the image.
Save the file and rename it as wp-config.php.
8)Now go to http://localhost/wordpress and install WordPress!!
Now simply go to wp-admin and start playing with your offline WordPress blog. You can do various things with local WordPress blog, as you can try making changes locally before making anything live on the online server. Most of WordPress developers, have WordPress installed on their personal laptop/computer, for making quick changes.In next tutorial, we will learn how to transfer data from local WordPress to a live WordPress blog.
Meanwhile, if you find any trouble with installing WordPress using XAMPP software, do let me know via comments. If you find this article useful, then do share it on Facebook and Twitter.
If you find any errors in installing or have any queries please post them as comments.
Xampp can be used for not only installing and testing wordpress but can be used to test out any projects which uses php, jquery and other languages that requires an apache server to function. We can even use Xampp to run php framework like Codeigniter which is a must for any developer.
Thanks for this wonderful share. Keep posting. 🙂
Went through all the steps and got to couldn’t establish a database. What did I do wrong?
There’s another step you might have missed: you need to create your database user and (in PhpMyAdmin) go to privileges and assign all privileges to your user. Make sure the user and pass match the wordpress wp-config.php file.
what is the meaning of Object not Found on my local server after I was Install my xamp and wordpress
why does my local wordpress object not found is there wrong with my database? or how do I Install my database inside xampp//htdocs?
Thank you for this guide, WAMP just decided it did not want to work anymore. I am now back up and running on my local server using XAMPP
and your guide.
Tahnk you
m finding trouble installing in the 1st process, the ‘MySql’ service starts n shows busy and doesn progress at all in the Control panel…
How to change the domain name plsssssss of wordpress to your desired site help plssss http://localhost/wordpress i want to change this to http://www.example.com how?
It’s very simple just go to htdocs in your xampp folder and rename the wordpress folder as http://www.example.com … u can’t use special characters like ‘//’
I Downloaded the WordPress 2.9 from their org website. And installed it using XAMPP. But during installation it came up with warnings and other messages –
Deprecated: Assigning the return value of new by reference is deprecated in C:xampphtdocswp27wp-settings.php on line 512
The above comes up when I open the front end.
If I try logging in then –
Deprecated: Assigning the return value of new by reference is deprecated in C:xampphtdocswp27wp-includestheme.php on line 1109
Warning: Cannot modify header information – headers already sent by (output started at C:xampphtdocswp27wp-settings.php:512) in C:xampphtdocswp27wp-login.php on line 255
Any recommendations would be appreciated.
Hey Harsh,
I am getting this error while importing my database.
Fatal error: Maximum execution time of 300 seconds exceeded in C:\Program Files\XAMPP\xampplite\phpMyAdmin\libraries\import\sql.php on line 131
What to do? 😛
I have fixed it. Thank you 🙂 Anyways delete my comments if you want.
Mandar why dont you mention the steps which you have taken to rectify the problem. This will help other users.
You are getting this error due to PHPMyAdmin time limit. To increase time limit follow these simple tips:
1) Take a look in .xamppphpMyAdmin for config-inc.php file.
2) Look for this line and adjust as required:
$cfg[‘ExecTimeLimit’] = 300; // maximum execution time in seconds (0 for no limit)
Or
If your config-inc.php file is small and missing the above line or missing altogether then the file config.default.php in the .xamppphpMyAdminlibraries folder is used.
1) The line in config-default.php may look similar to this:
/**
* maximum execution time in seconds (0 for no limit)
*
* @global integer $cfg[‘ExecTimeLimit’]
*/
$cfg[‘ExecTimeLimit’] = 300;
All you have to do is to remove ‘300′ and use ‘0′ for no limit. 🙂 [Credits]
This is very useful when you want to test new additions to your site! Can test without a risk 😀 Thanks for the article mate!
@arun kamath
thanks a lot! I never though my post would help you out to learn which even graduation doesn’t teaches! Ha ha ha 🙂
This is how i used to do before but if u have issues with iis like iis core is not installed properly this method will work til xampp install then it wont open in browser..
From this post I learnt how database actually works… Three years of Graduation couldn’t do that for me.
Really needed that..Wil give it a try today and ask u if anything goes wrong..Thanks..
Sunil