Avoid or limit revisions

Avoid or limit revisions

When you edit a page or post the old version will automatically be saved. Every time you edit a page or post, the old version is saved. These old versions pollute the database unnecessary, especially when you never delete them. You can install a plugin to manage and/or delete the revisions and clean up your database. You can also set a limit to the number of saved revisions or avoid saving revisions completely with some code.

When you have no need to keep old versions at all, you can add the following code to wp-config.php.

When you do not want to entirely disable saving revisions, but want to restrict, for example, to the last five, add the following code to your wp-config.php.

Always backup wp-config.php before you make any changes to it!

Ronald Heijnes

Since 2008 I have been busy with the functionality, management, maintenance and performance of self hosted WordPress. I like to share this knowledge!

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz
Close Menu