WordPress saves every revision of your posts and pages, including the most recent autosave, if there is one. If you messed something up and need to revert to a previous version, scroll down the editing screen to the Revisions box. There you'll see a list of all the revisions. Click one to view it. The title, content (as source code), and excerpt (for posts) will be shown (Figure 4-18). These fields, along with the author, are the only ones stored for each revision. At the bottom of this screen, there's another list of all the revisions, but this time you'll see radio buttons allowing you to select two revisions for comparison. Each revision also has a restore link on this page.

Restoring a post or page actually creates another revision. WordPress copies the revision you chose, saves it as a new version, marks it as the current revision. In other words, if you revert a post and later realize that you really do need the newer copy, it's still there. Just look in the revision list for the corresponding date.

As you might imagine, storing all these revisions can inflate the size of your WordPress database. If you're concerned about storage space, you can limit the number of revisions WordPress stores by adding the following line to your wp-config.php file: define('WP_POST_REVISIONS', 3);

To turn off revisions altogether, set the number to zero: define('WP_POST_REVISIONS', 0);

There are also several plugins that will handle this setting for you. They provide a Settings screen where you can make changes without having to edit your config file. Revision Control is a good one.

Figure 4-18. Comparing revisions

Was this article helpful?

0 0

Post a comment