UPDATE wp_posts SET guid = REPLACE (guid, 'http://oldsite', 'http://newsite');
UPDATE wp_posts SET post_content = REPLACE (post_content, 'http://oldsite', 'http://newsite');
UPDATE wp_postmeta SET meta_value = REPLACE (meta_value, 'http://oldsite', 'http://newsite');
UPDATE wp_options SET option_value = REPLACE(option_value, 'http://oldsite', 'http://newsite');
Se você quiser alterar o prefixo das tabelas do wordpress, você precisa fazer a próxima consulta:
UPDATE new_options SET option_name = 'new_user_roles' WHERE option_name = 'old_user_roles';
UPDATE new_usermeta SET meta_key = 'new_capabilities' WHERE meta_key = 'old_capabilities';