As with most things Magento, it isn’t too straightforward moving an installation from one domain to another.
I have provided this post as an outline on how to approach migrating your Magento installation.
The Magento site does have a migration guide, but essentially it means re-installing Magento with a new version, which is impractical for a number of reasons.
The method by which I managed to migrate my site was to make Magento reinstall itself using the files from my existing installation. This means that existing extensions, changes etc. are not changed or need re-installing.
- Upload the files from your existing installation to the new domain.
- Create a new database for the installation to use.
- Rename /app/etc/local.xml so that it isn’t referenced by Magento.
- Reload the site in a web browser and it will try and install Magento again.
- Re-install Magento.
- Empty the database.
- Export the data from the existing domain’s database.
- Import the data into the new database.
- Delete the new local.xml, and rename the previous one back to local.xml.
You need to ensure the key in local.xml is correct; you will be given this during the re-installation, so replace the one in your original local.xml file with the new one.
If you have any extensions installed, you need to make sure the appropiate database tables are inported into the new database.
This is really an outline of how I migrated Magento. If you check the forums on Magento’s site, you will see that people are having problems for a number of reasons when migrating Magento, which are outside the scope of what I listing here, which is only meant to be a guide.
A few helpful pointers:
- If you are having problems with the installation due to the database, this useful post on moving a Magento site from development to live server may help.
- It helps vastly to have shell access, and if possible root login.
- Refresh the cache if things aren’t working as expected.
- If you are having trouble migrating the datatbase data into your new datatbase, consider emptying the log_url_info table which are just logs and can get very big.
Good luck.