| 开发者 | takahironishii |
|---|---|
| 更新时间 | 2026年7月14日 15:47 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
wp_posts table. You never see them in the post list, but they still take up database rows, slow down backups, and add weight to every migration.
Takahiro Revision Cleanup shows you exactly how many revisions exist, lets you preview what will be removed before you commit, and deletes them safely through WordPress's own APIs. It's a modern, actively maintained replacement for older tools such as Better Delete Revision, which was removed from the WordPress.org directory in 2022 for security issues.
See before you delete
The dashboard shows the total revision count, an estimated storage size, and a lifetime counter of everything you've removed so far. A paginated preview list lets you check exactly which revisions belong to which posts before running a deletion. Nothing is hidden, and published content never appears in the list.
Delete by post type, not just "everything"
Some sites only want to clean up old blog posts and leave pages untouched. Others need to target a specific custom post type. This plugin breaks revisions down by post type, including orphaned revisions whose parent post no longer exists, and lets you delete each group independently or clear everything in one pass.
Built for large sites
Deleting tens of thousands of revisions in a single PHP request is how most cleanup tools time out. Version 1.3.0 adds one-click continuous deletion: press the button once, and the plugin works through revisions in batches of 200 via AJAX, with a live progress bar so you can watch it happen. If JavaScript is unavailable, it falls back to standard form submissions automatically.
Database housekeeping, without touching the whole database
After a large deletion, wp_posts and wp_postmeta can be left with unused space. The plugin runs CHECK TABLE and OPTIMIZE TABLE on just those two tables, not a blanket optimization of your entire database.
Cleans up correctly, not just quickly
Deletion goes through WordPress's native wp_delete_post_revision() function, so associated post meta and term relationships are cleaned up the way WordPress expects, rather than through a raw SQL DELETE that can leave orphaned data behind. A compatibility fix is also included for a known NextGEN Gallery issue during batch deletes.
Security
Revision cleanup is a destructive, irreversible database operation, so this was built with that in mind from the start:
manage_options by default, filterable via tnrc_required_capability)wp_posts and wp_postmeta onlytnrc_security_event) for logging or monitoring integrationstakahiro-revision-cleanup folder to /wp-content/plugins/.No. Only posts with the revision post type are removed. Published, draft, and scheduled content lives in a separate database record and is never touched.
Better Delete Revision was closed on WordPress.org in 2022 due to security issues. Takahiro Revision Cleanup follows the same core workflow (review revisions, delete them, check/optimize tables) and adds post-type filtering, a paginated preview, a lifetime counter, batch deletion with a progress bar for large sites, and security practices that meet current WordPress.org guidelines.
No. Deleted revisions cannot be restored unless you have a database backup taken before the deletion. Always back up before running a large cleanup.
Sometimes a parent post is removed outside of the normal WordPress flow while its revisions remain behind. The plugin detects these orphaned revisions separately in the post-type breakdown so you can review and remove them too.
That's what the progress bar in version 1.3.0 is for. Instead of one long request, deletions run in batches of 200 via AJAX, so large sites with tens of thousands of revisions can finish a full cleanup without hitting PHP execution time limits.
Not in the current version. Network-admin support is on the roadmap.
No. It only reads from and writes to your own WordPress database. No external requests, analytics, or tracking of any kind.
By default, only users with the manage_options capability (Administrators, in a standard setup) can access the tool. This is filterable via tnrc_required_capability for sites with custom role configurations.