Created
October 4, 2011 01:19
-
-
Save ashblue/1260698 to your computer and use it in GitHub Desktop.
WordPress MySQL URL Update
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
# To use this script you must replace the first url http://currentsite.com to http://newsite.com and run it in your MySQL | |
UPDATE asdf_options SET option_value = REPLACE(option_value, 'http://currentsite.com', 'http://newsite.com'); | |
UPDATE asdf_postmeta SET meta_value = REPLACE(meta_value, 'http://currentsite.com', 'http://newsite.com'); | |
UPDATE asdf_posts SET guid = REPLACE(guid, 'http://currentsite.com', 'http://newsite.com'); | |
UPDATE asdf_posts SET post_content = REPLACE(post_content, 'http://currentsite.com', 'http://newsite.com'); | |
UPDATE asdf_rg_lead SET source_url = REPLACE(source_url, 'http://currentsite.com', 'http://newsite.com'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment