1UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';
2
3UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');
4
5UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');
6
7UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');
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');
1options table
21. siteurl
32. home
4
5######## OR ########
6
7// Add to top of wp-config.php
8define( 'WP_HOME', 'http://example.com' );
9define( 'WP_SITEURL', 'http://example.com' );
10