当サイト、Codex 日本語版は今後積極的な更新は行わない予定です。後継となる新ユーザーマニュアルは、https://ja.wordpress.org/support/ にあります。
万が一、当サイトで重大な問題を発見した際などは、フォーラムWordSlack #docs チャンネルでお知らせください。</p>

WordPress の引越し

提供: WordPress Codex 日本語版
2005年1月29日 (土) 18:37時点におけるOtsukare (トーク)による版

(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先: 案内検索
この記事は翻訳時に編集が必要であるとマークされていました。その為Codex原文が大きく編集されている可能性があります。内容を確認される際は原文を参照していただき、可能であれば本項目へ反映させてください。よりよいCodexを作成するためのお手伝いをお願いします。

Backup Data

  1. Download your complete WordPress installation and any other files that are needed (such as images).
  2. Backup your database. Instructions for this are available at Backing_up_your_database.
  3. Now make a copy of your database. You will need to edit the .sql file, and in case of errors, it is important that you work on a copy.

Now check that you really have backed everything up.

Edit files

You need to edit one file in your WP directory, and make some changes to the database file.

wp-config.php

Open this file and alter the connection information to suit your new domain.

the database .sql file

If you are moving server, but not domain (in other words, if your website address is not changing), ignore this step

This file may have what are now old references to your previous domain - typically for images. They need removing and replacing.

  1. Using NOTEPAD or another plaintext editor, open the copy of the .sql database file.
  2. If you use Word, or any sort of word processor, or certain HTML editors, you will cause errors.
  3. What you need to do is find and replace all the instances of your old URL, with your new URL. So, if you had your blog at http://www.example.com/blog and you are moving it to http://www.tutorial.com/blog, we need to do some replacing.
  4. Using Notepad's Replace function, enter in your OLD full blog address, and replace it with your NEW full blog address. Check both are correct, then click the button to run the procedure.
  5. Now click 'Save' - do not use 'Save as'

Upload and Restore

Upload all your WordPress files, exactly as they were, to your new server.

Restore the database. Instructions for this are at Restoring_your_database_from_backup

There is one last check you must make:

From your website cpanel, choose phpMyAdmin, and select the database you are using.

You need to look inside the 'wp-options' table, and check that the values in 'site_url' and 'home' are correct.

Do check carefully that they are.

Before checking your new site, clear your cache and cookies.