We recently talked about installing a fresh copy of WordPress on your localhost or computer. Now we will tell you about importing your current online blog to localhost to make an exact copy. To proceed with this, you must know about localhost, so, it’s highly recommended that you read about installing the fresh copy of wordpress first. To import your online blog to localhost, you need to download your database and site first. To do that simply go to PHPMyadmin of your host and export your MySQL file and download the complete wordpress folder including all the themes and plugins.
Copy the downloaded wordpress files to C:\WAMP\WWW\wordpress\ or C:\XAMPP\Htdocs\wordpress\ depending on what package you installed for the localhost.
Point your browser to http://localhost/ and open PHPMyAdmin. Create new database, let’s call it ‘wp’. Click on the import tab and import your MySQL database to this empty database. If you receive file size exceeded error, please increase MySQL import size in PHPMyAdmin.
After the import is done, you will need to fix few settings. To do that open up the wp_option table in PHPMyAdmin. Change site_url and home variables to localhost eg if it’s set to http://myblog.com change it to http://localhost/wordpress/
Edit your wp-config.php file which can be found in the root directory of the wordpress folder which you downloaded and provide these settings:
You can now point your browser to http://localhost/wordpress/ and view your blog on localhost.