UPDATE wp_options SET option_value = replace(option_value, 'http://oldsite.com', 'http://newsite.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = replace(post_content, 'http://oldsite.com', 'http://newsite.com');
UPDATE wp_links SET link_url = replace(link_url, 'http://oldsite.com', 'http://newsite.com');
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://oldsite.com', 'http://newsite.com');
UPDATE wp_posts SET guid = replace(guid, 'http://oldsite.com', 'http://newsite.com');
Last active
June 5, 2020 10:19
-
-
Save hluker/69e90892988cb0595b985d7cf4fb69e9 to your computer and use it in GitHub Desktop.
useful sql commands
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
if you want to blow up your media library