Advertisement
Guest User

Untitled

a guest
Aug 14th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. SET @oldsite = 'URL', @newsite = 'URL';
  2.  
  3.  
  4. UPDATE wp_options SET option_value = replace(option_value, @oldsite, @newsite) WHERE option_name = 'home' OR option_name = 'siteurl';
  5. UPDATE wp_posts SET guid = replace(guid, @oldsite,@newsite);
  6. UPDATE wp_posts SET post_content = replace(post_content, @oldsite, @newsite);
  7. UPDATE wp_postmeta SET meta_value = replace(meta_value, @oldsite,@newsite);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement