Created
December 19, 2012 09:42
-
-
Save ptahdunbar/4335595 to your computer and use it in GitHub Desktop.
Please note: 1) this gists does not take into account serialized data that plugins may have added.
2) also does not support WordPress multisite.
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, 'http://wp.old', 'http://wp.new'); | |
UPDATE wp_posts SET guid = REPLACE(guid, 'http://wp.old', 'http://wp.new'); | |
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, 'http://wp.old', 'http://wp.new'); | |
UPDATE wp_options SET option_value = REPLACE(option_value, 'http://wp.old', 'http://wp.new') | |
WHERE option_name = 'home' OR option_name = 'siteurl'; | |
-- Optional, uncomment the following lines if you left comments on your site. | |
-- UPDATE wp_postsmeta SET comment_author_email = REPLACE(comment_author_email, '@wp.old', '@wp.new'); | |
-- UPDATE wp_postsmeta SET comment_author_url = REPLACE(comment_author_url, 'http://wp.old', 'http://wp.new'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment