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!

0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x