Before you put on a load of changes to a live site it’s advised to test. Obviously we hope you’ve tested locally, etc, but what if you have an external theme that’s been updated, and how do you test in as close to live as possible? Here is your answer:
- Backup your live database – see here for more info
- Backup your Magento site completely
- Create a new directory under your magento install called test
- Copy the Magento site files into this test directory, maintaining permissions (e.g. tar xvfp)
- Make a new database with a new name on your site
- Import the live database backup – you may want to disable foreign key checks when doing import
- Modify the core_config_table base_urls to point to your test location, e.g. http://www.mysite.com/test/
- Modify app/etc/local.xml to use the new database
- Run up frontend/backend and make sure is working
You now have a fully working test site. You can then make your changes on this without affecting the live site.
Once you are happy everything is working you can then either redirect people to use this new location, or do what I do and move your old site to a different subdirectory, and put your new site in the httpdocs folder.
The big advantage of this approach is that if you find an issue a couple of days down the line you can easily just move back to the old server – it’s still there in the background. I’d advise you switch off checkout so people can’t use the old version.