WordPressの管理画面上で古いURLを新しいURLへとまとめて置換できるVelvet Blues Update URLsプラグインのご紹介です。
カスタムフィールドに入っているURLの他、記事本文で使用している画像やサイト内リンクなどもまとめて置換できるので、特にWordPressサイトのお引越の時に非常に重宝します。
Velvet Blues Update URLs プラグインのインストール
管理画面のプラグイン新規追加ページよりVelvet Blues Update URLsを検索するか、以下のページよりプラグインファイルをダウンロードします。Velvet Blues Update URLs

データベースのURLを置換するので、事前にバックアップを取っておいてください。
Velvet Blues Update URLs でURLを置換
Velvet Blues Update URLs プラグインを有効化したら、管理画面左メニューの「ツール」から「Update URLs」へ進みます。
Setp1.の「Old URL」に置換前のURLを、「New URL」に新しいURLをそれぞれ入力します。

Setp2.では置換対象を選びます。

チェック項目は以下の通りで、
URLs in page content:記事本文
URLs in excerpts:記事の抜粋
URLs in links:リンク
URLs for attachments:添付ファイル
URLs in custom fields and meta boxes:カスタムフィールドやメタボックス
Update ALL GUIDs:GUID フィールド
URLs in excerpts:記事の抜粋
URLs in links:リンク
URLs for attachments:添付ファイル
URLs in custom fields and meta boxes:カスタムフィールドやメタボックス
Update ALL GUIDs:GUID フィールド
置換したいものにチェックを入れたら、ページ下部の「Update URLs NOW」ボタンをクリックします。

置換が成功すると、ページ上部に結果が表示されます。

コメント