Post revisions are located under your WordPress editor at the bottom of the edit post, posts and pages screens.
What is a Post Revision?
A post revision is created every time you add new content or edit the existing content of your post.
Your WordPress editor will automatically save ‘auto save’ a copy of your content as a precaution in case your accidently delete content or suffer a technical problem while editing content in your posts and pages.
Post Revisions Example:
You’ll find your sites page loading times will slow down once you start adding new posts on a regular basis because of post revisions.
Deleting Post Revisions
If each of your posts contains 20 post revisions and you have created 50 posts, the total number of posts in your database will be 1000 not 50.
Whenever a post is edited, a new row will be created in wp_posts table
You can easily delete post revisions which will reduce the size of your database and speed up your page loading times as a result of far less database queries needed to process the request to load the post.
3 Plugins Which Manage & Remove Post Revisions
- WP Optimize is a plugin to help optimize your database. It includes a feature for deleting post revisions.
- Another popular plugin is named Revision Control which also offers a feature to disable the saving of post revisions.
- Better Delete Revisions is also one of the best plugins for deleting post revisions.
Managing Post Revisions
You can easily disable or limit the amount of post revisions once you install the Revision Control plugin.
Choose from the drop down menu to disable post revisions on pages and/or posts.
You can also enter your own limits in the Revision Range box.
Using Code To Delete & Disable Post Revisions
To disable auto saving of post revisions, add this code to your wp-config.php file:
To delete all post revisions using code, run a database query in phpMyAdmin:
FROM wp_posts a
LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id)
LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)
WHERE a.post_type = ‘revision’
Personally, i have kept post revisions enabled and normally delete them about once a week. I take full backup every day so i have post revisions stored in most of my backups just in case.
How about yourself. Do you delete post revisions using a plugin or code?