The truth of WordPress revision management

It seems that many people disable the revision feature of WordPress. But is it what you really want? If you learn what WordPress really do and take care of them, the revision feature will be certain benefit to you.

In a default environment, WordPress works as follows.

  • A post has only one autosaved revision at most.
  • How revisions are made when you preview depends on post status.
  • Revisions are made only in the wp_posts table.
  • When you bulk edit posts, revisions are made.
  • When you quick edit posts, revisions are made, too.
  • The time of loading posts in permalinks is not proportional to the number of posts and revisions.

I’ll describe detail. (This is a behavior of the current version, WordPress 3.5. It might be changed in the future.)

Autosaved Revisions

A post has only one autosaved revision at most. New autosaves overwrite old autosaves. So you cannot have too many autosaved revisions.

But we know many revisions are made for a single post in WordPress. Why? It’s revisions mainly made when you do preview. So what you have to worry about is revisions of previews.

Revisions Made by Previews

When you preview your posts, revisions will be made. But the way of it depends on post status. If your post is ‘draft’ status which is a status of the post before you publish it, WordPress makes new revisions every time you preview. If your post has status other than ‘draft’ (such as ‘publish’), WordPress uses autosaves for preview. It means that it is most likely that wordpress overwrite autosaves when you do preview on published posts,

I guess cause of so many revisions for a single post in your WordPress is revisions made by previews before the publication. Do you agree?

Revisions of What?

Without the specific purposed plugin, revisions are made only in wp_posts table. It means that revisioning is not effective for taxonomies such as categories nor tags.

But if you change categories of your post in the Edit Post page, a new revision is made. You cannot tell how categories were changed from the revisions. It is useless except as a sign telling a change was made.

Bulk Edit and Quick Edit

Revisions are also made when you bulk edit or quick edit posts. Bulk editing and quick editing are simplest ways to change categories or tags. If you do it, useless revisions come again.

Performance and Revisions

The wp_posts table is well indexed in your database. So the time of loading a post in a permalink is not proportional to the number of posts and revisions. You don’t have to be so nervous.

It is true that you need more storage if you decide to keep revisions. But even though it is, the size of the post table which has mainly text data is generally smaller than the storage for images. Don’t be silly to save only tiny space while you waist other huge space.

How Do We Make It Better?

Regarding all these behaviors, I thought I like WordPress to do the followings.

  • Disable making revisions while bulk editing.
  • Disable making revisions while quick editing.
  • Delete revisions on the initial publication.

Does it sound difficult? Generally maybe. But fortunately I’m a programmer. So I made a plugin to do them. If you agree with this entry, you will like it :-). You can also manually remove particular revisions with it. Search the Thin Out Revisions plugin in your admin page and try it!

Related Links