Revision Tracking

WordPress has another tool that can help you manage successive edits. It’s called
revision tracking, and it saves old versions of every post. You can step through a
post’s edit history to see who changed a post, when the edit took place, and exactly
what that person changed.

NOTE Revision tracking is particularly useful on sites that have multiple authors. (And it’s a life-saver
when an overeager author overwrites another person’s work.) However, revision tracking works just as well on
single-author sites, where it lets you review your own edits.

You don’t need to turn on revision tracking—it’s always at work. Every time someone
saves a post as a draft, publishes it, or updates it, WordPress takes a snapshot of
the post’s content and adds it to the revision history. WordPress may also take a
snapshot of a post-in-progress as you edit it, but it won’t keep more than one copy
of your post in this state. After all, you wouldn’t want to clutter your revision list
with thousands of in-progress autosaves.
To see the edit history of a post, find the post in the All Posts page, and then click
Edit. WordPress displays the revision history in two places (Figure 11-11):
• The Publish box. Look here to find the number of revisions WordPress stored.
Click Browse to review these snapshots in the Compare Revisions page.
• The Revisions box. Check here to see a list of snapshots, from most recent to
oldest. To inspect a revision, click the timestamp next to it.

NOTE If you don’t see the Revisions box, click Screen Options in the top-right corner of the page, and then
add a checkmark next to the Revisions option.


Co-Authoring Posts

What if several people edit the same post? Can they all be
credited as authors?
Revision tracking is neat, but your readers don’t see any of that
information. All they see is the name of the post author—the
person who initially created the post. Even when someone
else edits a post, it remains the property of the initial author.
An editor or administrator can edit a post and attribute it to
someone else, but you can’t credit two people as authors of
the same post—unless you run a self-hosted site and you’re
willing to fiddle with your theme, as explained next.
To create true co-authored posts, you need to take two steps.
First, you need to add the Co-Authors Plus plug-in (http://, which lets you designate multiple
authors for any post or page. Second—and this is the hard
part—you have to get your posts and pages to actually display
the names of the authors who worked on them. To make that
possible, you need to edit your theme, as the Co-Authors Plus
plug-in explains (see

The easiest way to study the changes made to a post is to click the Browse link,
which appears in the Publish box next to the Revisions count. WordPress takes you
to the Compare Revisions page (Figure 11-12). Initially, it compares the differences
between the current version of a post (shown in green on the right) and the previously
saved version (shown in red on the left).

Once at the Compare Revisions page, you can dig deeper into the post’s edit history.
First, grab hold of the circle that sits in the small slider near the top of the page.
To see an older snapshot, drag the circle to the left. For example, if you drag the
circle one notch left, WordPress compares the previous version of the post (which
it shows on the right) to the version it saved just before that (which it shows on the
left). Keep dragging and you’ll go further and further back in time (Figure 11-13).
Alternatively, you can use the buttons on either side of the slider button. Click Previous
to go one step backward in time and Next to go one step forward.

To revert to an older version of a post, drag the slider back until the version you want
appears on the right, in green. Then, click Restore This Revision, which appears just
above the snapshot’s content.
When you drag the circle, WordPress compares two successive versions of a post
(the one you pick, and the one just before that). But WordPress also allows curious
administrators to perform an in-depth comparison that puts any two versions of a
post under the microscope. For example, you could compare the oldest version of
a post with the newest.
To do that, turn on the “Compare any two revisions” checkbox in the top-right corner
of the page. Two circles appear in the slider, representing the two posts you want
to compare. Drag the two circles to the two snapshots you want to examine, and
WordPress compares their content underneath.
Revision tracking has one drawback. Keeping extra versions of all your posts takes
space. If you host your site on, this isn’t a problem, because your
revision history tops out at 25 snapshots per post. After this point, WordPress tosses
out the oldest snapshot every time it takes a new one. But on a self-hosted site, there’s
no limit. If you’re an obsessive sort who revises the same post over and over, your
revision history can balloon into hundreds of snapshots per post. Even if you have
room for all these revisions (which you almost certainly do), it’s never a good idea
to waste space in your WordPress database. An unnecessarily big database makes
backups slower and can even slow down the overall performance of your pages.
Unfortunately, there’s no way to delete old revisions using the dashboard. Instead,
you need a plug-in to clear out the bloat. Numerous plug-ins can do the job, but
WP-Optimize ( is a popular, versatile choice. It clears
several types of old data out of your database, including old post revisions, old
drafts, and unapproved comments.
Alternatively, you can tell WordPress to save fewer snapshots. For example, you
could set WordPress to store a maximum of five revisions for each post. You can do
that with a plug-in (try the straightforward Revision Control, at
rev-control), or you can edit the wp-config.php configuration file using the process
described on page 570.
If you decide to edit the wp-config.php file, you need to add a line like this to the
end of the file in your website folder:
define(‘WP_POST_REVISIONS’, 5);.
This tells WordPress to store a maximum of five revisions per post. However, you
can replace the 5 with whatever number you want. Or you can tell WordPress to
never store any revisions by substituting this line of code:
define(‘WP_POST_REVISIONS’, false );
Now you’ll never have to worry about database bloat from old revisions, but you’ll
also lose the safety net that lets you recover content if you accidentally erase or
mangle it.

Revision Tracking

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s