WordPress change website URL

To change website url or you have migrated your wordpress website, you can make changes to the url by running following mysql queries:

UPDATE wp_options SET option_value = replace(option_value, 'https://blog.techsteppers.com','https://blog1.techsteppers.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'https://blog.techsteppers.com','https://blog1.techsteppers.com');
UPDATE wp_posts SET post_content = replace(post_content, 'https://blog.techsteppers.com','https://blog1.techsteppers.com');

UPDATE wp_postmeta SET meta_value = replace(meta_value,'https://blog.techsteppers.com','https://blog1.techsteppers.com');

Leave a Reply

error: Content is protected !!