Periodically purge old post revisions via WP Cron.
Unless post revisions are explicitly limited, WordPress will build up a hefty sum of revisions over time. While it’s great to have revision history for some recent content, the chances that old revisions will be necessary diminish the longer a post has been published. Revision Strike is designed to automatically remove these unneeded revisions on older, published posts.
First, a threshold is set, with a default of 30 days. Once a day, Revision Strike will run and find any post revisions in the database attached to published posts with a post date of at least 30 (or your custom threshold) days ago, and “strike” (tear-down and remove) them from the WordPress database.
If you’d like to help build Revision Strike, please visit the plugin’s GitHub page. Contributors are welcome, and details can be found in the repo’s README file.
Activating the plugin will automatically register a daily WP Cron event to clean up revisions on established posts. If you’d prefer not to wait, you can explicitly purge post revisions through the ‘Tools > Revision Strike’ page within WordPress or with WP-CLI.
Activating the plugin will automatically register a daily WP Cron event to clean up revisions on established posts. If you’d prefer not to wait, you can explicitly purge post revisions through the ‘Tools > Revision Strike’ page within WordPress or with WP-CLI.
Yes. On the Settings > Writing page there is an option to set the default number of days a post must be published before removing its revisions, but out of the box it’s 30 days.
Yup, just visit Tools > Revision Strike within the WordPress admin area. If you’re a WP-CLI user, you can also run Revision Strike from the command line (run wp revision-strike clean --help
for a full list of options).
For a full list of changes, please see the Change Log in the GitHub repo.
September 16, 2017
May 15, 2017
revisionstrike_capabilities
filter to allow setting required capabilities to access Revision Strike settings page. Props @pereirinha. (#28)March 4, 2017
RevisionStrikeCLI::log_deleted_revision()
in the WP-CLI component.July 29, 2016
June 20, 2016
revisionstrike_get_revision_ids
filter to enable third-party plugins and themes to alter the array of revision IDs. (#21)August 16, 2015
August 9, 2015