WordPressのデータベースを他のドメインへそのまま移行する際のWordPressのテーブルを直接変更する方法。
phpMyAdmin等でwp_optionテーブルを直接変更。
siteurlのoption_valueをwww.test.netからwww2.test.netに
homeのoption_valueをwww.test.netからwww2.test.netに
テーブルwp_postsのドメイン名を変更するSQL
UPDATE wp_posts SET post_content=REPLACE(post_content, "www.test.net", "www2.test.net") where post_content like '%www.test.net%'
UPDATE wp_posts SET guid=REPLACE(guid, "www.test.net", "www2.test.net") where guid like '%www.test.net%';