wordpress database query change url

Solutions on MaxInterview for wordpress database query change url by the best coders in the world

showing results for - "wordpress database query change url"
Chiara
31 Feb 2018
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');