WillSquire
12/18/2015 - 4:54 PM

Replace Wordpress URL in database

Replace Wordpress URL in database

UPDATE wp_options SET option_value = REPLACE(option_value, '[original_url]', '[new_url]');
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, '[original_url]', '[new_url]');
UPDATE wp_posts SET guid = REPLACE(guid, '[original_url]', '[new_url]');
UPDATE wp_posts SET post_content = REPLACE(post_content, '[original_url]', '[new_url]');