Using the following snippet, you will be able to migrate WordPress with an ease.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | SET @from_host = 'http://xxxxxx.website.com'; SET @to_host = 'http://www.xxxxxx.com'; UPDATE `wp_commentmeta` SET `meta_value` = REPLACE(`meta_value`, @from_host, @to_host); UPDATE `wp_comments` SET `comment_author_url` = REPLACE(`comment_author_url`, @from_host, @to_host); UPDATE `wp_comments` SET `comment_content` = REPLACE(`comment_content`, @from_host, @to_host); UPDATE `wp_icl_strings` SET `value` = REPLACE(`value`, @from_host, @to_host); UPDATE `wp_icl_string_positions` SET `position_in_page` = REPLACE(`position_in_page`, @from_host, @to_host); UPDATE `wp_icl_translation_status` SET `translation_package` = REPLACE(`translation_package`, @from_host, @to_host); UPDATE `wp_links` SET `link_url` = REPLACE(`link_url`, @from_host, @to_host); UPDATE `wp_options` SET `option_value` = REPLACE(`option_value`, @from_host, @to_host); UPDATE `wp_postmeta` SET `meta_value` = REPLACE(`meta_value`, @from_host, @to_host); UPDATE `wp_posts` SET `guid` = REPLACE(`guid`, @from_host, @to_host); UPDATE `wp_posts` SET `post_content` = REPLACE(`post_content`, @from_host, @to_host); UPDATE `wp_site` SET `domain` = REPLACE(`domain`, @from_host, @to_host); UPDATE `wp_sitemeta` SET `meta_value` = REPLACE(`meta_value`, @from_host, @to_host); UPDATE `wp_usermeta` SET `meta_value` = REPLACE(`meta_value`, @from_host, @to_host); UPDATE `wp_wprc_repositories` SET `repository_logo` = REPLACE(`repository_logo`, @from_host, @to_host); |
Snippet Source/Credit: itsgotto.be