Description
Takahiro Revision Cleanup helps site administrators review how many post revisions are stored in the database and remove them safely. It is a modern, secure replacement for abandoned plugins such as Better Delete Revision.
Features
- Overview of total revision count and estimated content size
- Paginated revision list (preview before delete)
- Breakdown by parent post type (posts, pages, custom post types, orphaned revisions)
- Delete all revisions or delete revisions for a single post type
- Lifetime counter of revisions removed
- Confirmation dialog before destructive actions
- CHECK TABLE and OPTIMIZE TABLE for
wp_postsandwp_postmeta(safer than optimizing the entire database) - Uses native
wp_delete_post_revision()so post meta and term relationships are cleaned correctly - NextGEN Gallery compatibility during batch deletes
- Security hardened for WordPress.org review: nonces, capability checks, prepared SQL, escaped output, per-user form tokens, rate limiting on destructive actions, strict DB table allowlist, batch size caps, and audit hooks
Why this plugin
Unlike older revision cleanup tools, this plugin focuses on a modern admin experience, granular deletion by post type, clear feedback after deletion, and WordPress coding standards compliance.
Installation
- Upload the
takahiro-revision-cleanupfolder to/wp-content/plugins/. - Activate the plugin through the ‘Plugins’ menu in WordPress.
- Go to Tools > Takahiro Revision Cleanup to review and delete revisions.
FAQ
-
Will this delete my published posts?
-
No. Only posts with the
revisionpost type are removed. Published content is not affected. -
How is this different from Better Delete Revision?
-
Better Delete Revision was closed on WordPress.org in 2022 due to security issues. Takahiro Revision Cleanup provides the same core workflow (review revisions, delete them, check/optimize tables) plus post-type filtering, pagination, lifetime stats, and modern security practices.
-
Can I undo a deletion?
-
No. Deleted revisions cannot be restored unless you have a database backup.
-
Does it work on multisite?
-
Multisite support is not included in version 1.2.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Takahiro Revision Cleanup” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Takahiro Revision Cleanup” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.2.1
- Remove Plugin URI header (must differ from Author URI on WordPress.org upload)
1.2.0
- Rename plugin to Takahiro Revision Cleanup (takahiro-revision-cleanup) per WordPress.org review
- Update Author and Plugin URI to https://takahiro-nishii.com
- Remove load_plugin_textdomain() (WordPress.org hosts translations)
- Expand function prefix from crm_ to tnrc_ (4+ characters)
1.1.2
- Add centralized TNRC_Security layer (form tokens, action allowlist, rate limits)
- Strict allowlist for CHECK/OPTIMIZE TABLE (wp_posts and wp_postmeta only)
- Cap bulk deletes at 2000 revisions per request with user warning
- Validate transient notice and db_check payloads before display
- Add tnrc_security_event audit hook for monitoring integrations
- Block direct directory access via index.php stubs
1.1.0
- Add paginated revision list preview (Better Delete Revision parity)
- Add lifetime deleted revisions counter
- Add CHECK TABLE before OPTIMIZE TABLE
- Use wp_delete_post_revision() for safer meta/term cleanup
- Add NextGEN Gallery batch-delete compatibility
- Add Settings link on the Plugins screen
1.0.0
- Initial release
