Last active
May 28, 2018 12:32
-
-
Save thoriqmacto/4ec48048369daf4a42b7691f2cdb1b78 to your computer and use it in GitHub Desktop.
[sql] Update Specific URL Inside wp_posts Table
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://www.your-site.com"', 'src="https://www.your-site.com"'); | |
UPDATE wp_2_posts SET `post_content` = REPLACE (`post_content`, 'src="http://www.your-site.com"', 'src="https://www.your-site.com"'); | |
UPDATE wp_posts SET `guid` = REPLACE (`guid`, 'http://www.your-site.com', 'https://www.your-site.com') WHERE post_type = 'attachment'; | |
UPDATE wp_2_posts SET `guid` = REPLACE (`guid`, 'http://www.your-site.com', 'https://www.your-site.com') WHERE post_type = 'attachment'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment