Created
May 24, 2015 21:52
-
-
Save sokratisg/5f7df1cb297f441376df to your computer and use it in GitHub Desktop.
WP convert http to https
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE wp_posts | |
SET post_content = ( Replace (post_content, 'src="http://', 'src="//') ) | |
WHERE Instr(post_content, 'jpeg') > 0 | |
OR Instr(post_content, 'jpg') > 0 | |
OR Instr(post_content, 'gif') > 0 | |
OR Instr(post_content, 'png') > 0; | |
UPDATE wp_posts | |
SET post_content = ( Replace (post_content, "src='http://", "src='//") ) | |
WHERE Instr(post_content, 'jpeg') > 0 | |
OR Instr(post_content, 'jpg') > 0 | |
OR Instr(post_content, 'gif') > 0 | |
OR Instr(post_content, 'png') > 0; | |
UPDATE wp_postmeta | |
SET meta_value=(REPLACE (meta_value, 'iframe src="http://','iframe src="//')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment