Перенос базы данных MySQL

Экспорт:

mysqldump -u YourUser -p YourDatabaseName > db_name.sql

Импорт:

mysql -u root -p root_pass db_name < db_name.sql

SQL-запрос:

UPDATE wp_options SET option_value = replace(option_value, 'http://site.com', 'http://newsite.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://site.com','http://newsite.com');
UPDATE wp_posts SET post_content = replace(post_content, 'http://site.com', 'http://newsite.com');