Forked from chuckreynolds/wordpress-change-domain-migration.sql
          
        
    
          Created
          August 14, 2019 10:40 
        
      - 
      
 - 
        
Save vunb/3137113f0b749c6c30fcd17f738292f7 to your computer and use it in GitHub Desktop.  
Revisions
- 
        
chuckreynolds revised this gist
Sep 24, 2014 . 2 changed files with 9 additions and 9 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,9 +0,0 @@ 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ SET @oldsite='http://oldsite.com'; SET @newsite='http://newsite.com'; UPDATE wp_options SET option_value = replace(option_value, @oldsite, @newsite) WHERE option_name = 'home' OR option_name = 'siteurl'; UPDATE wp_posts SET post_content = replace(post_content, @oldsite, @newsite); UPDATE wp_links SET link_url = replace(link_url, @oldsite, @newsite); UPDATE wp_postmeta SET meta_value = replace(meta_value, @oldsite, @newsite); /* only uncomment next line if you want all your current posts to post to RSS again as new */ #UPDATE wp_posts SET guid = replace(guid, @oldsite, @newsite);  - 
        
chuckreynolds created this gist
Jul 18, 2013 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ UPDATE wp_options SET option_value = replace(option_value, 'http://olddomain.com', 'http://newdomain.com') WHERE option_name = 'home' OR option_name = 'siteurl'; UPDATE wp_posts SET post_content = replace(post_content, 'http://olddomain.com', 'http://newdomain.com'); UPDATE wp_links SET link_url = replace(link_url, 'http://olddomain.com','http://newdomain.com'); UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://olddomain.com','http://newdomain.com'); UPDATE wp_posts SET guid = replace(guid, 'http://olddomain.com','http://newdomain.com');