WordPress automatically saves revisions when you are working on posts and pages. These can begin to add up pretty quick. 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
Click into the “Perfmatters” settings. Under the “Options” tab which is selected by default, scroll down to the option called “Limit Post Revisions.”
Select the number of 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.
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.