Jan 29
2014

Magento redirects to old domain when domain is changed

If Magento redirects to your old domain, and you just changed the domain, you need to make a small modification to the Magento database.

Find the table core_config_data and insert your new domain to rows where path is web/unsecure/base_url and web/secure/base_url

You can also update your Magento database with these two queries:

UPDATE core_config_data SET value="http://www.newdomain.com/" 
WHERE path="web/unsecure/base_url"
 UPDATE core_config_data SET value="https://www.newdomain.com/" 
 WHERE path="web/secure/base_url"

Remember the trailing slash (‘/’) or content is not loaded properly.

That will fix the problem.

This is tested on Magento 1.8.1.0 but will likely work on all newer versions.

This entry was posted in magento and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *