Sometimes I forget WordPress is based on a database so it needs a bit of cleaning up once in awhile. Some of the clutter comes from endless revisions WordPress stores. While it has saved me many times to have a recent revision of a blog to go back to, having 100 revisions is quite a bit of overkill. In addition to the text of the post itself, WordPress saves tags, meta information and more.
For revision intensive websites, I’ve begun enacting two changes to rein in the quantity of website slowing revisions.
Install Better Delete Plugin
The Better Delete plugin replaces an old favorite, Delete Revisions plugin, that wasn’t working with the latest versions of WordPress. Better Delete made some important improvements to better reduce the WordPress database size and speed up the website.
Reduce Revisions Being Saved by WordPress
If you never have the problem of too many revisions, you won’t have to delete them. After deleting the old revisions from the database, we want to do a bit of preventative medicine to prevent having to repeat this action regularly. However, it does take a bit of coding.
Find the wp-config.php file. It’s in the root directory of your WordPress installation).
I added the following code to wp-config.php file:
WP_POST_REVISIONS defines the number of post revisions that is saved. I selected “3,” but have seldom needed more than two.
AUTOSAVE_INTERVAL changes the time between automatically saving revisions. I changed it from 30 to 120 seconds.
Save the wp-config.php file.