Created
February 4, 2013 12:08
-
-
Save errkk/4706383 to your computer and use it in GitHub Desktop.
Move a WordPress blog from one host to another, so the permalinks work
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
SET @uri_from = 'www.devurl.local'; | |
SET @uri_to = 'www.liveurl.net'; | |
UPDATE wp_options SET `option_value` = REPLACE(`option_value`, @uri_from, @uri_to) | |
WHERE `option_value` LIKE CONCAT( "%", @uri_from, "%" ); | |
UPDATE wp_posts SET `guid` = REPLACE(`guid`, @uri_from, @uri_to); | |
UPDATE wp_posts SET `post_content` = REPLACE(`post_content`, @uri_from, @uri_to); | |
UPDATE wp_postmeta SET `meta_value` = REPLACE(`meta_value`, @uri_from, @uri_to); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment