Skip to content

Instantly share code, notes, and snippets.

@trabulium
Created February 15, 2017 05:46
Show Gist options
  • Save trabulium/438a8367cf0669f8645b5d977eeb73b2 to your computer and use it in GitHub Desktop.
Save trabulium/438a8367cf0669f8645b5d977eeb73b2 to your computer and use it in GitHub Desktop.
Replace http objects for https object via SQL in Magento
UPDATE catalog_product_entity_text
SET value = REPLACE ( value, 'src="http://www', 'src="https://www')
WHERE value like ('%src="http://www%');
UPDATE catalog_category_entity_text
SET value = REPLACE ( value, 'src="http://www', 'src="https://www')
WHERE value like ('%src="http://www%');
UPDATE cms_block
SET content = REPLACE ( content, 'src="http://www', 'src="https://www')
WHERE content like ('%src="http://www%');
UPDATE cms_page
SET content = REPLACE ( content, 'src="http://www', 'src="https://www')
WHERE content like ('%src="http://www%');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment