Created
August 27, 2012 21:39
-
-
Save seansasso/3492505 to your computer and use it in GitHub Desktop.
WordPress DB Domain Search and Replace
This file contains hidden or 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
# Pulled from http://www.idowebdesign.ca/mysql-replace/ | |
UPDATE wp_comments SET comment_author_url = REPLACE(comment_author_url, 'old-url.com', 'new-url.com'); | |
UPDATE wp_options SET option_value = REPLACE(option_value, 'old-url.com', 'new-url.com'); | |
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, 'old-url.com', 'new-url.com'); | |
UPDATE wp_posts SET post_content = REPLACE(post_content, 'old-url.com', 'new-url.com'); | |
UPDATE wp_posts SET post_excerpt = REPLACE(post_excerpt, 'old-url.com', 'new-url.com'); | |
UPDATE wp_posts SET guid = REPLACE(guid, 'old-url.com', 'new-url.com'); | |
UPDATE wp_usermeta SET meta_value = REPLACE(meta_value, 'old-url.com', 'new-url.com'); | |
UPDATE wp_users SET user_email = REPLACE(user_email, 'old-url.com', 'new-url.com'); | |
UPDATE wp_users SET user_url = REPLACE(user_url, 'old-url.com', 'new-url.com'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment