How do I relocate a Magento Install
It’s really not that bad once you know what to edit.
- make a backup of your magento database
- make a backup of your magento files
- install files and database at new location
- go into core_config_data table and search for “base”, there’s two base URLs you’ll need to point to new URL, the regular and secure one
- edit app/etc/local.xml to use new database credentials
- remove all files in var/cache and var/sesson
- set the permissions to 775 recursively on var
That’s it! You should be up and running with your Magento install at a new location. Please note that failure to set the permissions on var may create weird behaviour.