Title: Revision Autopilot
Author: Takahiro Nishii
Published: <strong>September 21, 2026</strong>
Last modified: September 21, 2026

---

Search plugins

![](https://ps.w.org/revision-autopilot/assets/banner-772x250.png?rev=3705036)

![](https://ps.w.org/revision-autopilot/assets/icon-256x256.png?rev=3705036)

# Revision Autopilot

 By [Takahiro Nishii](https://profiles.wordpress.org/takahironishii/)

[Download](https://downloads.wordpress.org/plugin/revision-autopilot.0.2.0.zip)

 * [Details](https://wordpress.org/plugins/revision-autopilot/#description)
 * [Reviews](https://wordpress.org/plugins/revision-autopilot/#reviews)
 *  [Installation](https://wordpress.org/plugins/revision-autopilot/#installation)
 * [Development](https://wordpress.org/plugins/revision-autopilot/#developers)

 [Support](https://wordpress.org/support/plugin/revision-autopilot/)

## Description

WordPress keeps a full copy of a post every time you update it. Over a few years
those copies quietly become the largest thing in your database. Plenty of plugins
will show you a button to delete them.

This one does not have a button.

Revision Autopilot publishes revision cleanup as **abilities** — named operations
with input and output schemas, permission callbacks and behavioural annotations —
using the Abilities API introduced in WordPress 6.9. Anything that can discover 
abilities can find these, understand what they take and return, check whether it
is allowed to run them, and read back a structured result. The same operations are
available as WP-CLI commands for scripts and cron.

It is built for sites where cleanup should happen without a person watching: agent-
driven maintenance, scheduled scripts, fleets of sites managed from one place.

#### What it exposes

Four abilities, all under the `revision-autopilot/` namespace:

 * `count-revisions` — how many revisions exist, their estimated content size, and
   the same broken down by parent post type. Read-only.
 * `list-revisions` — one page of individual revisions with their parent post and
   timestamps. Read-only.
 * `delete-revisions` — deletes one bounded batch for a scope and reports how many
   remain. Destructive.
 * `optimize-tables` — runs OPTIMIZE TABLE on the posts and postmeta tables. Destructive.

And three WP-CLI commands over the same code:

    ```
    wp revision-autopilot count
    wp revision-autopilot delete --scope=post --limit=100
    wp revision-autopilot optimize
    ```

#### How it stays safe

Handing destructive operations to a script deserves more care than putting them 
behind a button, not less.

 * **Every ability checks permission itself.** There is no admin form and no nonce
   in this path, so authorisation is never inherited from the surrounding request.
   Reading needs `edit_posts`; deleting or optimizing needs `manage_options`. Both
   are filterable.
 * **Deletion is always bounded.** One call never removes more than 1000 revisions
   however large the scope. The result says how many remain, so a caller loops deliberately
   rather than firing one unbounded request.
 * **Only revisions are deleted.** Every candidate is checked against `wp_is_post_revision()`
   before removal, and deletion goes through `wp_delete_post_revision()` so related
   metadata is cleaned up with it. Published content is never touched.
 * **Only two tables are ever optimized**, from a fixed allowlist: posts and postmeta.
 * **Refusals explain themselves.** A caller without permission gets a `WP_Error`
   saying which capability is missing, not a bare false.

#### Relationship to Takahiro Revision Cleanup

The same author publishes [Takahiro Revision Cleanup](https://wordpress.org/plugins/takahiro-revision-cleanup/),
which does revision cleanup through a screen under Tools. The two are for different
situations and do not overlap in how they are used:

 * Takahiro Revision Cleanup is for a person who wants to look at their revisions
   and click delete.
 * Revision Autopilot has no screen at all. It is for scripts, CLI and agents.

Install whichever matches how the work gets done on your site. Running both is harmless.

## Screenshots

[⌊wp revision-autopilot count reports the total, the estimated content size, and
a breakdown by parent post type.⌉⌊wp revision-autopilot count reports the total,
the estimated content size, and a breakdown by parent post type.⌉[

`wp revision-autopilot count` reports the total, the estimated content size, and
a breakdown by parent post type.

[⌊Deletion is bounded. --dry-run reports a scope without touching it, and --all 
repeats one batch at a time, saying what remains after each.⌉⌊Deletion is bounded.--
dry-run reports a scope without touching it, and --all repeats one batch at a time,
saying what remains after each.⌉[

Deletion is bounded. `--dry-run` reports a scope without touching it, and `--all`
repeats one batch at a time, saying what remains after each.

[⌊wp revision-autopilot optimize runs OPTIMIZE TABLE on the two allowlisted tables,
and a second count confirms what is left.⌉⌊wp revision-autopilot optimize runs OPTIMIZE
TABLE on the two allowlisted tables, and a second count confirms what is left.⌉[

`wp revision-autopilot optimize` runs OPTIMIZE TABLE on the two allowlisted tables,
and a second count confirms what is left.

## Installation

 1. Upload the plugin to `/wp-content/plugins/revision-autopilot/`, or install it through
    the plugins screen.
 2. Activate it.
 3. There is no settings page, by design. Verify it with `wp revision-autopilot count`,
    or list the registered abilities from your client of choice.

## FAQ

### Where is the settings page?

There isn’t one. This plugin exists to be called by something other than a human.
If you want a screen, use Takahiro Revision Cleanup instead.

### Is deleting revisions reversible?

No. Revisions are deleted permanently. Take a backup first, and use `--dry-run` 
or `count-revisions` to see what would go before it goes.

### Why does one call not delete everything?

Because an unbounded delete on a large site is a request that runs until something
kills it, leaving you with no idea how far it got. Each call removes a bounded batch
and tells you how many remain, so the caller stays in control. `wp revision-autopilot
delete --all` loops for you.

### Deleting revisions did not shrink my database.

Deleting rows does not shrink the table file; only OPTIMIZE does. Run `optimize-
tables` after deleting.

### Does it work without the Abilities API?

The abilities need WordPress 6.9 or newer. On an older site the WP-CLI commands 
still work, and the plugin does not error.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Revision Autopilot” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ Takahiro Nishii ](https://profiles.wordpress.org/takahironishii/)

[Translate “Revision Autopilot” into your language.](https://translate.wordpress.org/projects/wp-plugins/revision-autopilot)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/revision-autopilot/),
check out the [SVN repository](https://plugins.svn.wordpress.org/revision-autopilot/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/revision-autopilot/)
by [RSS](https://plugins.trac.wordpress.org/log/revision-autopilot/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 0.2.0

 * Added a Japanese translation, bundled in languages/ as a fallback until language
   packs exist on translate.wordpress.org.
 * Registered the plugin text domain on init, so bundled translations are actually
   loaded. The Domain Path header alone does not do this.

#### 0.1.0

 * Initial release: four abilities and three WP-CLI commands.

## Meta

 *  Version **0.2.0**
 *  Last updated **10 hours ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.9 or higher **
 *  Tested up to **7.1.1**
 *  PHP version ** 8.1 or higher **
 * Tags
 * [abilities](https://wordpress.org/plugins/tags/abilities/)[automation](https://wordpress.org/plugins/tags/automation/)
   [cleanup](https://wordpress.org/plugins/tags/cleanup/)[revision](https://wordpress.org/plugins/tags/revision/)
   [wp-cli](https://wordpress.org/plugins/tags/wp-cli/)
 *  [Advanced View](https://wordpress.org/plugins/revision-autopilot/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/revision-autopilot/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/revision-autopilot/reviews/)

## Contributors

 *   [ Takahiro Nishii ](https://profiles.wordpress.org/takahironishii/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/revision-autopilot/)