← All releases

wp-content/plugins/revisionist/revisionist.php

Revisionist

Compare two revisions side by side, and restore a single block instead of the whole post.

== Description ==

WordPress can already show you what changed between two revisions. Revisionist adds the part that was missing: restoring one block out of a revision without dragging the rest of the post back with it. Block markup is addressable, so this was always possible — nobody had built it.

Pruning runs on a schedule you set, respects WP_POST_REVISIONS when that constant is defined, and never deletes the revision a post is currently autosaving into. It logs what it removed, so a surprising number the next morning has an explanation attached.

On a site with 40,000 posts, the pruning job cut wp_posts by 61% and took eleven minutes. Those are the numbers from the site that made me write it.

== Screenshots ==

Numbered the way they ship in /assets/. Click any one to see it full width.

== Installation ==

  • Install and activate the plugin.
  • Open any post with revisions and use Compare in the editor sidebar.
  • Configure pruning under Tools → Revisions. It is off until you turn it on.

Pruning is never enabled by a plugin update. You switch it on, or it stays off.

== Frequently asked questions ==

Will pruning delete something I need?

It only removes revisions older than the window you set, and it never touches the current autosave. Run it in dry-run mode first — that mode exists for this question.

Does block-level restore work on classic content?

No. Classic content has no block boundaries to restore between, so the plugin falls back to whole-post restore and says so.

Does it slow down saving?

It adds one query on save. On the 40,000-post site above, that measured at under two milliseconds.

== Changelog ==

= 2.0.2 =

  • Block-level restore no longer creates an extra revision on save.
  • Pruning respects WP_POST_REVISIONS when it is set to a number.

= 2.0.0 =

  • Scheduled pruning, with a dry-run mode and a log.
  • Dropped the settings page in favour of a Tools screen.
  • Minimum PHP is now 8.1.

= 1.6.0 =

  • Restore a single block instead of the whole post. Only possible because block markup is addressable.