Skip to content

Instantly share code, notes, and snippets.

@feeela
Last active December 27, 2015 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save feeela/7356265 to your computer and use it in GitHub Desktop.
Save feeela/7356265 to your computer and use it in GitHub Desktop.
change the Magento host (e.g. after moving the shop to another domain)
-- move Magento to another server
SET @shop_domain = 'SOME_VHOST.local.de/',
@secure_protocol = 'https://'; -- set to 'http://' if no certificate is available
UPDATE `core_config_data` SET `value` = CONCAT('http://', @shop_domain, '/') WHERE `path` = 'web/unsecure/base_url';
UPDATE `core_config_data` SET `value` = CONCAT(@secure_protocol, @shop_domain, '/') WHERE `path` = 'web/secure/base_url';
UPDATE `core_config_data` SET `value` = CONCAT('http://', @shop_domain, '/media/') WHERE `path` = 'web/unsecure/base_media_url';
UPDATE `core_config_data` SET `value` = CONCAT(@secure_protocol, @shop_domain, '/media/') WHERE `path` = 'web/secure/base_media_url';
UPDATE `core_config_data` SET `value` = @shop_domain WHERE `path` = 'web/cookie/cookie_domain';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment