1# Check your table prefix
2# Change all the tables
3
4UPDATE wp_options SET option_value =
5replace(option_value, 'oldurl.com', 'newurl.com') WHERE option_name = 'home'
6OR option_name = 'siteurl';UPDATE wp_posts SET guid =
7replace(guid, 'oldurl.com','newurl.com');
8UPDATE wp_posts SET post_content = replace(post_content, 'oldurl.com', 'newurl.com');
9
10UPDATE wp_postmeta SET meta_value = replace(meta_value,'oldurl.com','newurl.com');