Created
April 7, 2013 23:36
-
-
Save timkinnane/5333108 to your computer and use it in GitHub Desktop.
Wordpress, find and replace url in database.
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
UPDATE wp_options SET option_value = REPLACE (option_value, 'http://oldurl','http://newurl'); | |
UPDATE wp_posts SET guid = REPLACE (guid,'http://orldurl','http://newurl'); | |
# Change "wp_" to your database's table prefix | |
# Change oldurl, newurl (oldurl is the one in the database already) |
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
UPDATE wp_options SET option_value = REPLACE (option_value, 'http://oldurl','http://newurl'); | |
UPDATE wp_posts SET guid = REPLACE (guid,'http://orldurl','http://newurl'); | |
# Change "wp_" to your database's table prefix | |
# Change oldurl, newurl (oldurl is the one in the database already) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment