Revisions in the WordPress Database

Over the last few years, our team has written several tutorials that help you find key information in the WordPress database. Here are some of those guides:

In this guide, we're going to look at where post revisions are stored in the WordPress database. If you're not familiar with how revisions work, check out this detailed revisions overview.


How Revisions Are Stored

WordPress revisions are all stored in wp_posts table. This means that you will find revisions stored in exactly the same way here as published posts. Here are some of the differences between a row for posts and a row for revisions:

  • The post_status column
  • The post_name column
  • The post_type column

The image below shows the post_status column. Revisions use the Inherit status. Autosaves are similar to revisions and use the Auto Draft status.

Revisions In WordPress Database
Revisions In WordPress Database 1

The image above also shows the post_name column. The post_name column is normally the title of the post. However, for revisions, the format is different:

  • [post ID of original post]_revision_v1

In the image above, the ID of the original post is 1.

The image below shows the post_type column. Normally this shows the post type (post, page or a custom post type). For revisions, the column is set to revision. Finally, it's worth noting the post_parent column which connects the revision back to the original post.

Revisions In WordPress Database
Revisions In WordPress Database 2

Introducing PublishPress Revisions

One of the most popular plugins here at PublishPress is built on top of this revisions feature.

PublishPress Revisions is the ultimate tool for making content changes in WordPress.

PublishPress Revisions offers a safe space for users to work on content updates. When the changes are ready, users can ask for approval to publish the update. Administrators can approve or reject the changes. They can also schedule them to go live in the future.

  • Steve Burge

    Steve is the founder of PublishPress. He's been working with open source software for over 20 years. Originally from the UK, he now lives in Sarasota in the USA. This profile is generated by the PublishPress Authors plugin.

    View all posts

Leave a Reply

Your email address will not be published. Required fields are marked *