If you run a website with WordPress, you will surely know what revisions are. Revisions are cached data which are stored while you are preparing a publication. So if you have revisions enabled, you should delete the saved data every one to two weeks, as they are not necessary and add "weight" to your database.
The problem is that if at some point you forget to delete them, so many will accumulate that the plugins existing (Better Delete Revision) to automatically delete them, they will be timed out.
The article is addressed to those who do not host their website at wordpress.com, and have access to SQL.
If you search Google for a solution, there is a simple SQL statement, but you should not use it in your WordPress installation. The command will delete the revisions, but will leave all metadata in your database.
Do not use this command:
DELETE FROM wp_posts WHERE post_type = "revision";
Before you start, get a backup of your database.
Then go to the SQL command execution box and do copy (ctrl+C) – paste (ctrl+V) the following command:
DELETE a, b, c FROM wp_posts and LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id) LEFT JOIN wp_postmeta c ON (a.ID = c.post_id) WHERE a.post_type = 'revision'
Run the command from GO.
If you want to disable all revisions, you can add the following code at the bottom of the wp_config.php file to WordPress.
define ('WP_POST_REVISIONS', false);