There are few advantages of moving (copying) your wordpress blog to local machine.
1. You will have an exact mirror of your wordpress blog on your machine.
2. You will know that backup you have downloaded from the remote site is working, as it should.
3. Experiment locally with features before you make them online. You can try any plugin or theme locally, before you upload them to make live.
4. You will also know, How to move wordpress to a new domain?
It is always pleasing to have a working mirror of your blog on your desktop. If you are new to wordpress or haven’t installed wordpress locally on your machine; here are two links you should follow.
1. How to install PHP, MySQL and Apache on windows?
2. How to install wordpress on local machine?
3. How to take wordpress backup from remote site?
Here is the process for copying/downloading data and running wordpress on windows.
1. Install wamp server, as described here.
2. Open folder [c:\wamp\www] and create a new folder inside it. Name of the folder can be any name; it is a good practice to give it blog name. In this example, I will demonstrate process using one of my blog located at http://www.rekhaa.net. Whenever you see name [rekhaa], replace it with your blog name or domain. So, create a folder [rekhaa] inside [c::\wamp\www\rekhaa].
3. Download all wordpress files from your remote server. Use Ftp client to download files. I use CoreFTP FTP client. I have given an intro of this software here.
4. De-compress/copy wordpress files to [c:\wamp\www folder].

5. Download the database backup as described here. Open the compressed backup file and extract .SQL file on your desktop.
6. Right click on wp-config.php and open it in notepad. Note down databaseName, UserID and Password on paper. These are the settings you had used at the time of remote wordpress blog installation.
// ** MySQL settings ** // define('DB_NAME', ' The name of the database'); define('DB_USER', ' Your MySQL username '); define('DB_PASSWORD', ' MySQL password ');
7. Next step is to create a MySQL database and user for that database. Open http://localhost in your browser and click on phpMyAdmin under tools options. PhpMyAdmin interface will open. Create a database, uid and password using phpMyAdmin.
8. From phpMyAdmin index page, enter name of the database (yourblogname) in Create new database text field and click on the create button.

9. phpMyAdmin will create an empty database for you. Click on the Privileges tab, root is the default user for database and having all the privileges. To create a different user, click on the edit icon under Action column.

At the bottom you would see options creating a new user. Select the … keep the old one option and click on the Go button.

A new window will popup, type in your user name (username as in wp-config.php) and password (password as in wp-config.php) and leave host field as it is. Make sure that all the Global Privileges check boxes are on. Click on the go button. Now if you check the privileges tab, you would find a new user there.
10. Select your database from the left top area of the phpMyAdmin interface by clicking on its name or select it from the drop down list.

11. Click on the Import tab from phpMyAdmin’s right pan. Click on the browser button and select the .SQL file you saved in step 5. Click on Go button to start the import process. You will get information about no of queries executed after successful import. This process may take some time depending on size of your backup file.

12. Since now our blog address is changed from http://www.rekhaa.net to http://localhost/rekhaa, we have to update this in options and posts table in our local database. You can do this either by Find/Replace method in .SQL file or run an update query through phpMyAdmin. Open .SQL file in wordpress and replace all instances of http://www.rekhaa.net to http://localhost/rekhaa. You have to do this before importing the database. This method is not recommended as text editors can’t handle large .SQL files. We will update database using SQL queries. Click on SQL tab in right pan.

13. We have to change home and siteurl fields in options table. Copy and paste following code in SQL field. Don’t forget to change http://www.rekhaa.net and http://localhost/rekhaa with your own urls.
UPDATE options SET option_value = REPLACE(option_value, 'http://www.rekhaa.net', 'http://localhost/rekhaa') WHERE option_name = 'home' OR option_name = 'siteurl';
Click on Go button to execute the query.
14. Now its time to fix the urls of the posts and pages. We have to update two fields in posts table, guid and post_content. We have to update the urls because wordpress stores them as abosulte urls not relative. Execute following two queries one by one as you did in step 13.
UPDATE posts SET guid = REPLACE(guid, 'http://www.rekhaa.net','http://localhost/rekhaa'); UPDATE posts SET post_content = REPLACE(post_content, 'http://www.rekhaa.net', 'http://localhost/rekhaa');
15. Open http://localhost/rekhaa in web browser and you should get your blog index page displayed there.

16. Index page looking fine, now click on any post title. You will get an error, this error is due to invlid permalink redirection.

17. To fix this first you have to enable rewrite module in apache server and modify .htaccess file. Click on the wamp icon in the system tray and choose Apache > Apache Modules and enable rewrite_module. You have to scroll down to find this option. Wait for wamp to enable this module for you. Wamp icon will turn to white color again from yellow.
18. Move to [c:\wamp\www\rekhaa] folder, right click on .htaccess file and open it with wordpad. Change RewriteRule . /index.php [L] line to RewriteRule . /rekhaa/index.php [L]. Now check out the posts and pages and they should render fine in your browser.
This wraps up the tutorial. I hope it was informative to all you wordpress newbies. I need your support in order to spread the word [aniquito]. If you host a blog, add a backlink to us and do tell your friends about this. Subscribe the feed that way you will be informed about the blog articles/tutorials and information.










My database is too large and times out when trying to import. Any idea how to get around this?