Free on WordPress.org

Block Restore

Restore a single block from an old revision, not the whole post.

Use it when

  • someone deleted a paragraph and the post has changed since.
Restoring a deleted paragraph from a revision
Restoring a deleted paragraph from a revision
Picking an earlier version of one block, with its changes highlighted
Picking an earlier version of one block, with its changes highlighted
Finding deleted text across revisions
Finding deleted text across revisions
Restoring a block of a template part in the Site Editor
Restoring a block of a template part in the Site Editor
Restoring a group, with what differs inside it
Restoring a group, with what differs inside it

What it does

WordPress revisions are all or nothing. If someone deleted a paragraph last week and the post has been edited ten times since, "Restore This Revision" brings the paragraph back but throws away the ten edits. The usual workaround is copying text out of the revisions screen by hand, which loses the block’s formatting and settings.

Restore Blocks from Revisions works inside the block editor and restores single blocks, with all their settings.

Restore one block to an earlier version

  1. Select the block and open its menu (⋮).
  2. Choose Restore from a revision…
  3. Pick a revision. You see the versions of that block in it, best match first.
  4. Click Replace current block, or Insert below it to compare them side by side.

Bring back a deleted block

  1. Open the editor’s main menu (⋮ at the top right).
  2. Choose Restore blocks from a revision.
  3. Pick a revision. Its blocks are labelled Not in the post now, Changed since or Same as now.
  4. Click Restore it here to put a deleted block back where it was.

Find text you deleted

Can’t remember which revision had the sentence you need? Type a few words into "Find text in old revisions". Every block that contained them is listed, with how many revisions it appears in. Click one to jump to it.

Every restore is a normal edit: press Ctrl+Z (⌘Z on a Mac) to undo it, and nothing is saved until you update the post.

  • "Show changes" highlights the words that differ between the block now and its old version.
  • Previews show each block as it looked in that revision.
  • Each revision shows who saved it and how many blocks differ from now. Autosaves are labelled, and the window opens on the newest revision that actually differs.
  • Works with any block, including blocks from other plugins, and with every post type that has revisions.
  • Revisions are loaded without rendering them on the server, so posts with many revisions open quickly.

No settings and nothing stored in the database.

Free and open source under the GPL. No pro version, no upsells, no ads in wp-admin, no tracking. And it stays that way.

Install

  1. Download axle-block-restore.zip (v3.1.0).
  2. In wp-admin, go to Plugins > Add New Plugin > Upload Plugin and choose the zip.
  3. Click Install Now, then Activate.

Or with WP-CLI:

$ wp plugin install https://github.com/aryanjasala/axle-block-restore/releases/download/v3.1.0/axle-block-restore.zip --activate

To try it first, try.axlewp.com/axle-block-restore opens a private WordPress in your browser with this release and some demo content.

Compatibility

Checked by the end-to-end tests on every change. Unit tests run on PHP 7.4 to 8.4.
WordPressPHPStatus
WordPress 7.1PHP 8.3Tested
WordPress 6.9PHP 8.3Tested
WordPress 6.6PHP 7.4Tested

Questions

How does it find "the same block" in an old revision?

Blocks have no permanent ID between saves, so it compares blocks of the same type, preferring the one at the same position and with the most words in common. You can always pick a different version from the list.

Where is the option? I can’t see it.

It appears in the block editor for post types that keep revisions, such as posts and pages. If revisions are turned off for the site (WP_POST_REVISIONS set to false), there is nothing to restore from.

Does it work in the Site Editor?

Not yet. Templates have revisions too, and support is planned.

Changelog

3.1.0

  • New: show recently removed blocks and copy blocks from another post
  • New: restore blocks in the Site Editor, from the command palette, and by content or styling

3.0.0

  • Changed (breaking change): rename to Axle Block Restore for WordPress.org
  • Fix: keep the selected revision’s details readable

2.0.1

  • Fix: load revision content on WordPress 6.6 to 6.9

Every release, with notes: GitHub releases.