跳到内容

Simple Revisions Delete

v2.0.2

Brice Capobianco · 2015年1月5日 上架

Delete the revisions of a post one by one or all at once, from the block editor, the classic editor or a bulk action.

正在使用
1 万+
评分
4.9 / 5
累计下载
23 万
最近更新
2026年10月3日
50 条评价需要 WordPress 6.4+已测试到 6.9.12PHP 7.4+

截图

The purge control in the classic editor
The purge control in the classic editor
Purge in progress
Purge in progress
Purge done
Purge done
The bulk action
The bulk action
Deleting a single revision
Deleting a single revision
The purge control in the block editor
The purge control in the block editor

Delete the revisions of your posts individually or all at once, either from the editor or through a bulk action. Works with both the block editor and the classic editor.

What does it do?

Simple Revisions Delete adds a discreet purge control next to the revisions counter of the post you are editing. One click and the revisions of that post are gone.

It helps you keep a clean database by removing unnecessary post revisions. Unlike most similar plugins, it lets you delete the revisions of a specific post rather than wiping every revision of your site at once.

The plugin blends into the WordPress admin, relies exclusively on core functions to delete revisions safely, and adds no settings page: there is nothing to configure.

How does it work?

  • In the block editor, a “Purge” button sits in the post status panel of the sidebar, right below the publishing options. It tells you how many revisions the post has and deletes them all in one request.
  • In the classic editor, the same control appears in the Publish metabox, and each revision listed in the Revisions metabox gets its own “Delete” button.
  • In the posts and pages list, a “Purge revisions” bulk action lets you clean up several posts at once.

Everything happens in the background, so no page reload is needed: the block editor relies on the WordPress REST API, the classic editor on admin-ajax. Without JavaScript, the classic editor control falls back to a regular form submission and the bulk action keeps working.

What’s new in 2.0?

The block editor integration has been rewritten from scratch. The previous version relied on jQuery and on the internal markup of the editor, which stopped working when Gutenberg 7.1 reorganised its DOM. The purge control is now a genuine editor plugin (PluginPostStatusInfo) reading and writing through a dedicated REST API, so it no longer depends on class names that can change at any release.

The rest of the plugin has been rewritten too: one class per responsibility, no more inline <style> and <script> blocks, destructive actions moved off GET requests, native bulk action filters instead of injected jQuery, and an interface that works with a keyboard and a screen reader.

See the plugin page

NOTE: this plugin has no settings page, and needs none.

Post type support

The supported post types are post and page by default. Use the wpsrd_post_types_list filter to add your own or to remove the defaults:

function bweb_wpsrd_add_post_types( $post_types ) {
    $post_types[] = 'additional-cpt';
    $post_types[] = 'another-cpt';

    return $post_types;
}
add_filter( 'wpsrd_post_types_list', 'bweb_wpsrd_add_post_types' );

Use get_post_types() if you want to support every custom post type at once.

Custom user capability

The capability required to delete revisions is delete_post. Override it with the wpsrd_capability filter:

function bweb_wpsrd_capability() {
    return 'edit_post';
}
add_filter( 'wpsrd_capability', 'bweb_wpsrd_capability' );

REST API

The plugin registers three routes under the wpsrd/v1 namespace. All of them check that the post type is supported and that the current user holds the capability above for the requested post:

  • GET /wpsrd/v1/posts/<id>/revisions — returns the number of revisions
  • DELETE /wpsrd/v1/posts/<id>/revisions — deletes every revision of the post
  • DELETE /wpsrd/v1/posts/<id>/revisions/<revision_id> — deletes a single revision

Each response returns the number of deleted revisions and the number of revisions left.

Languages

The plugin only holds a handful of sentences, easy to translate through its .po and .mo files. Available languages:

Want to add yours? Get in touch

CHECK OUT MY OTHER PLUGINS

Please ask for help or report bugs if anything goes wrong. It is the best way to make the whole community benefit from it!

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums