Did you know you can save revisions of your WordPress posts and pages to be accessed from the edit screen in the website admin panel?
If you find WordPress revisions not showing, and want to turn them on, you can enable them using a snippet of code in your wp-config.php file. Want them, but don’t need to save more than a most recent version? You can limit how many revisions to save. You can also disable revisions as well.
Editing Your WordPress Configuration File
Edit your website’s wp-config.php with the following snippets of code depending how you want to use revisions. Read more about editing your wp-config.php file.
Disabling Post Revisions
define( 'WP_POST_REVISIONS', false );
Enabling Post Revisions
define( 'WP_POST_REVISIONS', true );
Specify the number of Post Revisions
define( 'WP_POST_REVISIONS', 3 );
Deleting Revisions Using WordPress plugins
If you have revisions turned on and you don’t specify how many revisions to save, you may end up with a copy of every version of every post you’ve ever made. That can cause a lot of data to pile up that’s unnecessary.
A WordPress revisions plugin I found called Optimize Database after Deleting Revisions helps with cleaning up those extra unwanted post revisions, as well as extra database fields that could probably use some cleaning up too. It also enables revisions for pages as well.
After you adjust these settings in the image below, you can choose what database tables you want optimized before running the optimizer.
Another plugin I’ve used is called Thin Out Revisions. It’s a simpler plugin that focuses just on deleting revisions. If most of all your revisions happen in the post draft phase, you can opt to automatically delete all revisions when the post is published. You can also set a daily task to clean up revisions. I like this plugin because it adds the option to choose which revisions you want to delete per post.
Do you use post revisions? What plugin do you use to handle them? Leave a comment below!