While adding the post or pages in wordpress, it will automatically save your posts/pages to make sure that your changes should not lost.
WordPress store this auto saved versions as a revisions in the post table. We can manage this autosave interval as well.
To know more about this post auto save interval, check out our atricle.
But what if you want limit the number of revisions per post or want to disable this post revisions facility.
Don’t worry, you don’t have to make any changes in wordpress code. You can manage this with wp-config.php file only.
Please find below code snippet for limit the number of revisions or disable the post revision facility.
Limit the Number of Revision:
// This will store only 3 revisions of any posts.
Disable Post Revisions:
// This will disable wordpress post revision feature.
Note: If we do not set this value in wp-config.php file, then it is default set to TRUE.