Deleting Post Revisions In WordPress

Anyone who uses WordPress must be knowing what revisions are, or atleast they must have heard about it. Revisions is nothing but a post type and a feature of WordPress. It allows WordPress to automatically save your posts and pages after a certain time interval while you are still working on them.

Why Is Revision Needed In WordPress?

Revisions are a part of WordPress for a specific reasons i.e. Risk Of Losing Data. When you are working on a post or a page, there might be unforeseen circumstances such as computer crashes, or closing the browser by mistake, or computer getting switched off due to electricity problems, or you forgot to save your work before going to another page. A machine (computer) can sometimes behave in an unpredictable manner, which can be caused by, internal or external factors. To avoid the effect of such factors, WordPress has this inbuilt feature in revisions, which is available at your disposal.

Drawback Of Having Revisions In WordPress

Revisions is definitely a good thing to have in a WordPress website but having said that, there is also a major drawback of having revisions in WordPress. When you are writing a post in a WordPress website, whatever you have typed is automatically stored in the database, after every 60 seconds. Now suppose you are writing the 3rd paragraph of your post, and suddenly you realize that, you have made a typing mistake in the 1st paragraph, then you can always scroll back and correct the mistake you had made, but with this also comes the drawback we are talking about, since now there will be two copies of your post stored in the database, the one you previously typed and saved, and the one you saved after correcting your typing mistake. Because of this, your database gets filled with unnecessary data, and if you continue like this and keep on having multiple revisions for your posts, overtime your database will be filled with a lot of junk and your website will become really slow and sluggish. And nobody likes a slow and sluggish website. You will lose audience and in-turn your income.

But there is no need to worry. You can overcome this drawback by deleting the revisions from your database and make your website fast again.

To learn how to check the speed of your website, please look at the post below,

How To Check The Speed Of Your Website

Also, to increase the speed of your website, please check out my posts below,

Delete Post Revisions In WordPress

You can delete the post revisions in WordPress by two methods

  1. Manual Method
  2. By Using WP-Optimize Plugin

Manual Method

I personally prefer this method over the other method, as I like to have full control on what I am working with. For this method you need to have access to phpMyAdmin.

Before making any changes to the database, make sure that you have created a back up for your database, and store it in a different location, in case you might need to use it later on.

  • Log in to the CPanel of your WordPress website by going to the below URL and entering your username and password.
https://www.YourWebsiteName.com/cpanel
CPanel Login Screen
  • In the CPanel go to phpMyAdmin under Databases and Click on it.
  • After going to phpMyAdmin, select your website database from the left column and Click on it.
  • After your database tables load in the right column of phpMyAdmin, Click on the SQL tab from the Top Menu.
Click On SQL
  • Fill in the QUERY given below for deleting all the revisions from the database and Click on Go.
DELETE FROM wp_posts WHERE post_type = "revision";
Enter The Query
  • The QUERY will delete all the revisions from your database. The result is shown below.
Revisions Removed

This is the easiest way for someone who has bit of a knowledge about phpMyAdmin and the backend.

By Using WP-Optimize Plugin

For someone who doesn’t have enough knowledge of the backend, this plugin method is preferable.

  • In the WordPress dashboard go to Plugins => Add New. Install and activate the WP-Optimize plugin.
WP Optimize Plugin
  • After activation, go to WP-Optimize » Database and check the box next to Clean all post revisions option and Click on the Run Optimization button to delete all post revisions. This will clean up your database and get rid of all the post revisions that were stored there.
Clean All Post Revisions

If you want you can uninstall the plugin after you are done with clearing your post revisions.

Which method to utilize is completely up to you, but both the methods are effective, so choose any method your want. My advice to you would be clean your database and get rid of posts revision from time to time. This will really help you in making your website run faster. I will be writing a post on how to manage your posts revisions soon, for those people who want to keep the post revisions but in limits.

A Passionate Blogger And The Owner Of Convey Arena, A Website, Which Deals With The Nuances Of Affiliate Marketing, Blogging, SEO, Web Hosting and WordPress.

Scroll to Top