Linux 软件免费装

Takahiro Revision Cleanup

开发者 takahironishii
更新时间 2026年7月14日 15:47
PHP版本: 7.4 及以上
WordPress版本: 7.0
版权: GPLv2 or later
版权网址: 版权信息

标签

performance database cleanup revision delete revision

下载

1.0.0 1.2.1 1.3.0

详情介绍:

WordPress saves a full copy of a post every time you update it. Over months or years of editing, these copies — revisions — pile up quietly in the 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: What it doesn't do This plugin focuses on one job: reviewing and deleting revisions safely. It doesn't include page caching, image optimization, or general cleanup of transients, spam comments, or orphaned options. If you want a single plugin that handles everything, a broader optimization suite may suit you better. If you want to see what's in your revisions before removing them, and trust that the removal won't touch anything else, that's what this plugin is for.

安装:

  1. Upload the takahiro-revision-cleanup folder to /wp-content/plugins/.
  2. Activate the plugin through the 'Plugins' menu in WordPress.
  3. Go to Tools > Takahiro Revision Cleanup to review and delete revisions.

升级注意事项:

1.3.0 Adds one-click progressive deletion with a progress bar for large revision sets. 1.2.1 Fix WordPress.org upload validation (Plugin URI removed). 1.2.0 Renamed for WordPress.org review. Deactivate the old slug and activate takahiro-revision-cleanup. 1.1.2 Security hardening: form tokens, rate limits, stricter validation, and audit hooks. 1.1.0 Adds revision preview list, database check, and Better Delete Revision compatibility improvements. 1.0.0 Initial release.

常见问题:

Will this delete my published posts?

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.

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 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.

Can I undo a deletion?

No. Deleted revisions cannot be restored unless you have a database backup taken before the deletion. Always back up before running a large cleanup.

What happens to "orphaned" revisions?

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.

Will deleting thousands of revisions time out my site?

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.

Does it work on multisite?

Not in the current version. Network-admin support is on the roadmap.

Does this plugin send any data externally?

No. It only reads from and writes to your own WordPress database. No external requests, analytics, or tracking of any kind.

Who is allowed to use this?

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.

更新日志:

1.3.0 1.2.1 1.2.0 1.1.2 1.1.0 1.0.0