Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPBカップ
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

投稿リビジョンでWordPressの変更を元に戻す方法

編集メモ: WPBeginner のパートナーリンクから手数料を得ています。手数料は編集者の意見や評価に影響を与えません。編集プロセスについて詳しく知る。

WordPressには、変更を元に戻したり、過去の投稿に戻ったりできる機能がビルトインされていることをご存知ですか?この機能は投稿リビジョンまたは単にリビジョンと呼ばれています。

私たちの多くは、文章を書くときに間違いを犯す。さっき書いたものを削除しなければよかったと思うこともあるだろう。リビジョンを使えば、過去にさかのぼって変更を取り消すことで、それを修正することができる。

この投稿では、投稿リビジョンでWordPressの変更を簡単に取り消す方法を紹介します。

Easily undo changes in WordPress with post revisions

注:この投稿では、WordPress投稿の変更を元に戻す方法を説明します。WordPressの更新を元に戻したい場合は、WordPressをロールバックする方法をご覧ください。

投稿リビジョンとは?

WordPressには、投稿やページのリビジョン履歴を保存する強力なシステムがあります。

作業中の下書きごとに、WordPressは自動的に一時的なリビジョンを保存します。このタイプのリビジョンは自動保存と呼ばれます。

WordPressは60秒ごとに自動保存を保存します。また、古いバージョンを新しい自動保存に自動的に置き換えます。

Autosave Posts in WordPress

自動保存機能は、コンテンツを保存する前に何か問題が発生した場合に、コンテンツを復元するのに役立ちます。例えば、執筆中にブラウザーがクラッシュしたり、コンピューターがハングアップした場合、自動保存から最新の下書きを復元することができます。

WordPressは、ユーザーが保存、更新、公開ボタンをクリックするたびに投稿リビジョンも保存します。自動保存とは異なり、これらのリビジョンはWordPressのデータベースに永久に保存されます。

投稿編集画面から、これらのリビジョンを検索し、参照し、元に戻すことができます。

このような便利なワークフロー機能がWordPressを地球上で最も人気のあるブログプラットフォームにしている。

それでは、投稿リビジョン機能を使ってWordPressの投稿やページの変更を取り消す方法を見ていきましょう。

投稿リビジョンを使うべき理由

WordPressユーザーのほとんどが、投稿のリビジョンから恩恵を受けることができます。優れたコンテンツを書くには、多くの調整と編集が必須です。投稿リビジョンを使えば、自分の投稿がどのように進化していったのか、その過程を俯瞰して表示することができます。

その後、下書きのさまざまな状態を切り替えて変更を加え、投稿を公開するための完璧な状態にすることができる。

複数の投稿者がいるWordPressサイトでは、投稿リビジョンによってエディターが複数の投稿者の作業を簡単に管理することができます。誰が投稿に変更を加えたか、どのような変更を加えたかなどを見ることができます。

それでは、投稿リビジョンを使ってWordPressの投稿やページを改善する方法を見ていきましょう。

動画チュートリアル

Subscribe to WPBeginner

文章での説明がお望みなら、このまま読み進めてほしい。

カテゴリー:WordPressで投稿リビジョンを使って変更を取り消す方法

WordPressでは、投稿日/ページ編集画面の「ドキュメント」パネルの下にリビジョン数が表示されます。

投稿エディター画面の右側にあります。リビジョン」をクリックすると、投稿リビジョン画面に移動します。

Gutenberg WordPress Post Revisions

投稿リビジョン画面では、投稿の最新リビジョンが表示され、上部にスクロールバーが表示されます。スクロールバーのボタンをスライドさせると、その投稿の以前のリビジョンに移動できます。

WordPress Post revision screen

各リビジョンで行われた変更は、緑色とピンク色で強調表示されます。上部には、変更を行ったユーザー、時間、その他の情報が表示されます。

WordPressは、リビジョンが自動保存か下書きかもお知らせします。

Autosaved Post WordPress

次のボタンと前のボタンを使って、リビジョンを移動することができます。

さらに、上部にある「任意の2つのリビジョンを比較する」というボックスにチェックを入れることができます。そうすることで、スクロールバーのボタンが2つに分割され、それぞれのボタンを別のリビジョンに移動して、離れた2つのリビジョンの違いを比較することができます。

Compare Two revisions WordPress posts

リビジョンを復元するには、「このリビジョンを復元」または「この自動保存を復元」ボタンをクリックするだけです。

WordPressは選択したリビジョンを現在の投稿リビジョンとして復元し、下書きとして保存することができます。

Restore a Revision in WordPress

カテゴリー:以前のリビジョンにリストアしても、最新バージョンの投稿は削除されないことを覚えておいてください。その代わり、WordPressはそれを別のリビジョンとしてデータベースに保存します。

古いWordPressエディターで投稿リビジョンを使う

WordPressをGutenbergにアップグレードしておらず、古いクラシックエディターを使用している場合、投稿/ページ編集画面の右パネルにある公開メタ情報ボックスに投稿リビジョンが表示されます。

Browse Post Revisions in WordPress Classic Editor

投稿のリビジョンを表示するには、リビジョン数の次の「参照」リンクをクリックするだけです。これ以外では、投稿リビジョンはクラシックエディターとGutenbergの両方で同様に機能します。

カテゴリー:WordPressで投稿のリビジョンを制限または削除する

投稿のリビジョンはすべてWordPressのデータベースに保存されます。このため、多くのユーザーは、リビジョンが多すぎるとサイトが遅くなるのではないかと心配しています。

そんなことはない。

WordPressはフロントエンドでデータベースを呼び出す際に投稿のリビジョンをスキップします。投稿の編集画面や、実際にリビジョンを閲覧しているときにのみリビジョンを探します。

WordPressでは、投稿のリビジョン数をコントロールすることができます。投稿のリビジョンを制限するには、WordPressサイトのwp-config.phpファイルに次のコードを追加するだけです。

define( 'WP_POST_REVISIONS', 10 );

10を各投稿のリビジョン数に置き換えてください。

古い投稿リビジョンを削除することもできます。リビジョンが本当に〜してもよいですか?

まず、サイトのWordPressバックアップを新規に作成します。これにより、何か問題が発生した場合にサイトを復元することができます。

次に、WP-Optimizeプラグインをインストールして有効化する必要があります。詳しくは、WordPressプラグインのインストール方法のステップバイステップガイドをご覧ください。

有効化した後、WP-Optimize ” Databaseページに行き、’Clean all post revisions’オプションの次のボックスにチェックを入れます。

Clean post revisions

すべての投稿リビジョンを削除するには、「最適化を実行」ボタンをクリックしてください。リビジョンを削除した後、プラグインをアンインストールすることができます。

注意:リビジョンを削除しても、WordPressが将来の投稿のためにリビジョンを保存することはありません。

この投稿が、WordPressで投稿リビジョンを使って変更を取り消す方法をご理解いただくのにお役に立てば幸いです。また、WordPress でキーワードとメタ情報を追加する方法や、WordPress のエキスパートが選んだサイトを成長させる最高のプラグインもご覧ください。

この投稿を気に入っていただけたなら、WordPress動画チュートリアルのYouTubeチャンネルをぜひご購読ください。Twitterや Facebookでもご覧いただけます。

情報開示 私たちのコンテンツは読者支援型です。これは、あなたが私たちのリンクの一部をクリックした場合、私たちはコミッションを得ることができることを意味します。 WPBeginnerの資金源 をご覧ください。3$編集プロセスをご覧ください。

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

究極のWordPressツールキット

ツールキットへの無料アクセス - すべてのプロフェッショナルが持つべきWordPress関連製品とリソースのコレクション!

Reader Interactions

33件のコメント返信を残す

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

    • WPBeginner Support says

      If your site says that the revision was removed then the revision may have been deleted which would prevent you from using it.

      管理者

  2. Mona says

    What if my first developers did not have revisions turned on. Then I got a new developer, I messed up my site then had revisions turned on. Will they still work to revert back to the date before they were turned on?

    • WPBeginner Support says

      If revisions were disabled, you would not have revisions from before it was active.

      管理者

  3. Sunil says

    Thank you so much, very informative, I accidentally removed all my content and updated the site but I followed your steps, and yes it’s again back…

  4. Reggie says

    Thanks so much for this. I accidentally overwrote a post when I thought I was working in a clone of it. I felt so sick, but this saved me!

  5. Milosh says

    I’ve just applied a ton of changes and saved, and accidentally pressed wrong key where all my changes were rolled back. THIS SAVED MY DAY! Thanks a lot!

  6. Mark Hallowell says

    When I click on the 26 revisions, it takes me to the Compare Revisions of “page”, but it is completely blank. Any ideas how I can see my revisions?

  7. Terri Zwierzynski says

    I’m not finding the Revisions section when editing a page.

    I see the Status and Visibility block on the right (Visibility, Publish Date, Author, Move to Trash) and then the Permalink block. No list of revisions anywhere…did something change in WordPress 5.5??

    • WPBeginner Support says

      You would want to ensure the post has saved versions of if to revert to. You may have plugins or settings that are limiting or removing the post revisions from your site.

      管理者

  8. Chloe Young says

    Is it possible to take something from a previous revision and bring it to your current one without changing the whole thing?

    • WPBeginner Support says

      You could copy the content and paste it into the current version, but currently reverting to a revision would take all of the previous version’s differences.

      管理者

  9. dd solei says

    suggestion – it would be great if you could include a screenshot of “WHERE” to go to get to ‘Revisions’ I used it before, but can’t remember how to get back to it. I was hoping your article would help me, but unfortunately it’s useless to me because I have no idea where “the ‘Document’ panel on the post/page edit screen” is. There is a tab for Pages and a tab for Posts. Where is post/page edit screen??

    • WPBeginner Support says

      When you edit a specific page or post with the block editor you should see the document editing on the right-hand side of the page

      管理者

  10. Chris Feddersen says

    Good day,
    I am a complete beginner. I work for a small business, which had an existing website. I was trying to change the look of the website, and lost the original website and all it’s content by saving and publishing to the new theme. Is there any way I can restore the original website?

    • WPBeginner Support says

      Yes, you can connect to your website using an FTP client. Go to /wp-content/themes/ folder and download all files and folders inside it to your computer as a backup. After that delete all theme folders (using FTP) except the one that last worked on your site.

      管理者

  11. Vicki O'Dell says

    Is this something that has been discontinued? It does not exist in the current version that I have. I just lost a good 1,000 word post and I don’t even know how it happened. I’m so bummed.

  12. Philip says

    I restored a older version by using Revisions. Is there any way to undo that and go back to the newest version again?

  13. Graeme says

    I cam to this page seeking help in undoing revisions to themes and other changes. This page is helpful in affirming that posts or pages can have be “revision-ed” but that is not what I need.
    How do I undo other kinds of saved changes?

  14. Salvador says

    Is there a way to undo publish in general?

    I was in the themes section, clicked ‘customize’ and by mistake clicked on ‘save & publish’… the page wasnt even close to finished so the original website is gone and I’m stuck with a website with no content yet.. help!

  15. Charlie Sasser says

    I always knew this was there but never really used. Thanks for bring this up.

    What is the impact and performance hit on the database? Is there a build in way or a good plugin that will selectively flush the old versions for the database?

  16. Ralph Ferro Jr., Esq says

    This is a very practical and great instructional article – wish you had more of these which is geared for the novice. e.g. when doing testimonials – it is cutting off and not allowing two pages – how can this be fixed?

    how do you change your menu to have a button look using an object to insert in your page descriptions rather than plain test.

    this was written well and very easy to follow – some are written for programmers…

返信を残す

コメントありがとうございます。すべてのコメントは私たちのコメントポリシーに従ってモデレートされ、あなたのメールアドレスが公開されることはありませんのでご留意ください。名前欄にキーワードを使用しないでください。個人的で有意義な会話をしましょう。