Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save oscar-reales-interactiv4/5480867 to your computer and use it in GitHub Desktop.
Save oscar-reales-interactiv4/5480867 to your computer and use it in GitHub Desktop.
Magento: Replace domain / store URLs direct in MySQL (no sed)
#Select all the config data with the current domain in the value
select * from core_config_data where value like "%www.old-domain.com%";
#replacing www.old-domain.com with www.new-domain.com
update core_config_data set value=REPLACE(value, 'www.old-domain.com', 'www.new-domain.com')
where value like "%www.old-domain.com%";
#check if it worked!
select * from core_config_data where value like "%www.new-domain.com%";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment