I want to create another instance of magento for development purposes.
I’ve copied the site and the database and changed the connction string for the database.
However, when I go to log in to magento it re-directs to the live site http://www.example.com rather than going to the test url test.example.com.
Both instances exist on the same box.
After a bit of digging arund I think I need to change the root_dir, but not sure where to change this.
Can anyone help?
Thanks
Tom
— Edit —
I’ve updated the two fields in question in the database, but all urls still point to the production environment.
Do I have to run a specific script to update all of these across the whole site?
— Edit 2 —
There was more than one instance of the two urls in the table, after updating these and deleting the cache and sessions directories from the var folder everything worked.
You need to edit the database table “core_config_data”. Look for records with a path of “web/secure/base_url” or “web/unsecure/base_url” and you will see where to change the URL. You may need to clear the cache.
You don’t need to change root_dir after all since that is automatic.