One way to prevent an accumulation of revisions from piling up in your WordPress database is to remove the opportunity for them to in the first place. You can do this by disabling post revisions.
In order to disable post revisions permanently, locate your WordPress site’s wp-config.php file that’s located in the root directory. Add the following line of code at the very top:
define( ‘WP_POST_REVISIONS’, false );
This line of code disables post revisions from being saved to your database in the future. If you’d like to enable this option sometime in the future (for whatever reason), simply replace the line with:
define( ‘WP_POST_REVISIONS’, true );
When you’re done, be sure to save your changes before exiting. Completely disabling post revisions isn’t necessarily something we recommend. There are other less drastic options you can pursue to optimize and manage revisions in your database. However, if you do want to do it, it helps to know that option is there and can easily be activated or deactivated when necessary.