Your moment has arrived! It’s time for your website to go LIVE, and this snippet will help you do it the right way, easily.
Run this code in PHPMyAdmin. Change fromaddress to your development URL, and toaddress to your production URL. All done!
SET @find = 'fromaddress'; SET @rep = 'toaddress'; UPDATE wp_options SET option_value = REPLACE(option_value, @find, @rep); UPDATE wp_posts SET post_content = REPLACE(post_content, @find, @rep); UPDATE wp_posts SET guid = REPLACE(guid, @find, @rep); UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, @find, @rep);
Note: If this is your first time adding code snippets in WordPress, then please refer to our guide on how to properly add code snippets in WordPress, so you don’t accidentally break your site.