One of the most frequent things you do after setting up a blog is posting content (Obvious you might say).
I initially started posting content using the WYSIWYG editor built into WordPress. However the editor was very slow especially when you try to edit an already existing post and this used to discourage me from making any changes in the post.
In this post I am going to run down the steps needed to setup a local version of your WordPress blog. Other than posting content easily, it helps you in trying out with new templates/themes and also play with the different WordPress plugins before you put it live on your web site.
To Run WordPress, you need to have following things !
Many people know from their own experience that it’s not easy to install an Apache web server and it gets harder if you want to add MySQL, PHP and Perl.
At the moment there are four XAMPP distributions:
I am going to continue with the XAMPP for Windows scenario, however for other platforms there shouldn’t be much changes.
Installation of XAMPP
One thing to note while installing is the path of installation: I happened to suffix an additional XAMPP in the installation path and I ended with
To check if XAMPP is properly installed, type the following URL in the browser
You should be prompted with a welcome screen confirming the status of the installation.
Install/Copy WordPress into XAMPP
If you want to make a fresh install of WordPress, i.e. if you don’t want to import any data from your website, proceed with the Famous 5-Minute Installation of WordPress. The only step to change is w.r.t. database configuration in wp-config.php.
// ** MySQL settings ** //
define(‘DB_NAME’, ‘WP’); // 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
Copy the WordPress folder under
- If you want a exact replica of your website blog, use an FTP tool to download all the contents including images and plugins. Modify the wp-config.php as shown above. file Copy the blog directory under [XAMPP_INSTALL_DIR]/htdocs
The file structure should look similar to this:
WordPress stores all the posts/comments in the MySQL database. Create a database named “WP“using the following steps:
Go to http://localhost/xampp
Click on phpMyAdmin under the Tools Section.
Create the “WP” database as shown below
Exporting data from your blog (WebSite)
Export your WordPress blog data using WordPress Database Backup Plugin. The plugin also has the option of exporting data from the tables used by some WordPress plugins. The plugin exports the data into an SQL file. Additionally you have to use the FTP tool to download images and the plugins used in your blog.
Now you cannot import this SQL file into the local “WP” database as such. This is because most of the content/links will still be referring to your website.
Make a copy of the backup file. Open the SQL File in a text editor such as Textpad. Use the Find/Replace option to replace your website URL with your XAMPP URL as shown below:
Importing Modified SQL file into your local database
After modifying the SQL file, follow these steps to import the file into your local database.
Select the”WP” database
Select the “import” option
Select the modified SQL file in the “File To Import Section”.
Click on Import.
Now assuming you have named the local blog as “wordpress”, your local blog should be up and running at
In case you have imported blog data from your web site , the users and administrator settings will also be imported and the same can be used to login to your local WordPress administration page.