Created
February 25, 2016 16:57
-
-
Save timwright12/409cd6394c6d796e45c1 to your computer and use it in GitHub Desktop.
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 guid=replace(guid, 'http://old.url', 'http://new.url'); | |
UPDATE wp_posts SET post_content=replace(post_content, 'http://old.url', 'http://new.url'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
first i check the table prefix before i run the query
[11:58]
to make sure it is actually wp_
[11:59]
then look at the values in the guid column
[11:59]
of the posts table
[11:59]
to get the exact URL(s) could be multiple versions
[11:59]
actually the very first step is to copy a dump of the wp_posts data