Skip to content

Instantly share code, notes, and snippets.

@pixelbart
Last active August 19, 2017 14:33
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 pixelbart/ca4404f3830ef374b02f07b449f535f3 to your computer and use it in GitHub Desktop.
Save pixelbart/ca4404f3830ef374b02f07b449f535f3 to your computer and use it in GitHub Desktop.
replace http to https (mysql) wordpress
UPDATE `wp_posts` SET post_content = REPLACE(post_content, 'https://', 'http://') WHERE post_content LIKE '%http://%';
UPDATE `wp_postmeta` SET `meta_value` = REPLACE(meta_value, 'https://', 'http://') WHERE meta_value LIKE '%http://%';
UPDATE `wp_options` SET `option_value` = REPLACE(option_value, 'https://', 'http://') WHERE option_value LIKE '%http://%';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment