0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

WordPressのwp_postsのドメイン名を変更するSQL

0
Posted at

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%';

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?