you are here: codestackercodes [RSS]update wordpress url

update wordpress url

use this sql when migrating a website

UPDATE wp_options SET option_value = replace(option_value, 'http://oldsite', 'http://newsite') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET guid = replace(guid, 'http://oldsite','http://newsite');

UPDATE wp_posts SET post_content = replace(post_content, 'http://oldsite', 'http://newsite');

Comments