We set WP_POST_REVISIONS to 5. That means that up to 5 revisions of a post or other content are stored in our database, which allows you to revert to a previous revision where that functionality is enabled.
To see revisions in action, first make sure the Revisions metabox is displayed on your add/edit post/page screen by visiting the Screen Options in the upper right of that screen and confirming that the Revisions setting is checked. With the Revisions metabox displayed, you can select one of up to 5 prior revisions, compare it to the current content, and revert to that revision if you determine that’s a good choice.
Post revisions were introduced in WordPress in version 2.6. While they can be a useful tool, they come at a small performance penalty. Each saved revision adds a new database record for the revision. If your site has 1000 posts and 5 revisions each, the number of records required to store those records is 6 times greater than simply storing the posts themselves. Databases with more records are slower than those with fewer records. Our fast database system compensates for this performance penalty, so the net performance impact of storing a small number of revisions isn’t material.
At the same time, revisions offer some big potential benefits. For example, custom CSS is stored so that it includes revisions, and that makes it easy to change the styling of your site and revert back to a previous version if the change proves undesirable.
We think keeping a small but manageable number of revisions minimizes the performance penalty while preserving almost all of the meaningful benefits.
Posted in: Technical