Some times, you want to migrate your live magento site to local server, for some dev requirements. This could really be a pain in the arsenic* if you will be a lil careless when you do this migration. So please take care of some important steps when you do this
- Copy all files/folders from Live Site
- Export the DB backup from live site
- Delete every thing inside /var/cache folder
- Rename/delete local.xml file in /app/etc folder
Now you can create a new Database in your local server using phpMyAdmin or any other DBTool you like. Go to http://localhost/your_local_magento_site – this would be your local server folder that you copied all files from live server.
Now it will give you a new installation procedure. Go for it.
Once you finish everything, you are good to go for local version of your Live Magento website.
If you are getting a redirection problem, that http://localhost/_your_local_magento_site is still redirecting to your live server address, then you have to make sure a few more things
- make sure clearing /vare/cache folder
- Do this query in your phpMyAdmin or any other mysql tool you use
SELECT * FROM `core_config_data` WHERE `path` LIKE '%base_url%'
and set value to your localhost address. 3. Make sure your .htaccess file is not redirecting to your live server
Edit the core_config_data Table
Find the table called core_config_data in the list of tables shown on the left of phpMyAdmin, click it and then click Browse. Remember that if you opted for a prefix for your tables then the table name will be yourprefix_core_config_data.
Find the field web/unsecure/base_url and change the associated value from your existing directory destination to your new one. Remember to include http:// at the start and a trailing / at the end.
Now find the field web/secure/base_url and change the associated value in the same way.
and finally, remove your old local.xml file, you can change that file name to local.xoo or some thing.
After installation, go to Admin section and then
(i)Flush all cache. (ii)Re-Index all data. (iii)Flush all cache.
there you can go the local Magento site !!