WordPress automatically saves revisions when you are working on posts and pages. These can begin to add up pretty quickly. By default, there is no limit in place. We have seen posts with over 1,000 revisions. Multiply this by 50 pages and suddenly you have over 50,000 revisions sitting in your database. The problem with this is that you will most likely never use them and they can start slowing down your database as well as using disk space.
So we recommend either disabling or limiting your revisions. It is nice to have a couple because we all make mistakes. So that is why we built in a couple of options for you to choose from:
- Default (no limit)
- Disable Post Revisions
How to disable or limit post revisions
Follows the steps below to disable or limit post revisions.
Click into the Perfmatters plugin settings.
Make sure you’re on the “General” tab.
Under the “Options” section, scroll down and choose an option under “Limit Post Revisions.” This will determine how many revisions you want to save, or you can disable them altogether.
We personally like having at least 3 revisions, but no more so to keep our database small and snappy.
Scroll down and click “Save Changes.”
After limiting or disabling them, make sure to clean up all of your existing revisions.
If you get a warning saying that WP_POST_REVISIONS is already enabled somewhere else on your site, that is most likely due to one of the following reasons:
- You are already using this feature in another plugin, such as WP Rocket. You only need to enable the feature in one or the other, but not both.
- You have the following code already defined in your
wp-config.phpfile. If so, you need to remove it.