Generate SQL Queries to Move Your WordPress Site
Need to move your WordPress site from one host to another? Perhaps you just need to update all your URLs to HTTPS for better search engine optimisation?
Generate SQL Queries
UPDATE wp_options SET option_value = REPLACE(option_value, 'http://old.url.com', 'https://new.url.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = REPLACE (post_content, 'http://old.url.com', 'https://new.url.com');
UPDATE wp_posts SET post_excerpt = REPLACE (post_excerpt, 'http://old.url.com', 'https://new.url.com');
UPDATE wp_postmeta SET meta_value = REPLACE (meta_value, 'http://old.url.com','https://new.url.com');
UPDATE wp_termmeta SET meta_value = REPLACE (meta_value, 'http://old.url.com','https://new.url.com');
UPDATE wp_comments SET comment_content = REPLACE (comment_content, 'http://old.url.com', 'https://new.url.com');
UPDATE wp_comments SET comment_author_url = REPLACE (comment_author_url, 'http://old.url.com','https://new.url.com');
UPDATE wp_usermeta SET meta_value = replace(meta_value, 'http://old.url.com','https://new.url.com');
UPDATE wp_links SET link_url = replace(link_url, 'http://old.url.com','https://new.url.com');
UPDATE wp_posts SET guid = REPLACE (guid, 'http://old.url.com', 'https://new.url.com') WHERE post_type = 'attachment';
Have a Project for Us?
Tell us where you're headed, and we'll show you how we can help you get there.
Let's chat