How To Delete Post Revisions In WordPress Site

In this article, you will learn, how to delete post revisions in WordPress site. Anyone who uses WordPress knows what post revisions are.

Post Revisions are nothing but a post type & a feature of any WordPress site. It allows WordPress to automatically save your blog posts after a certain time interval, while you are still working on them.

Before you learn how to delete post revisions in WordPress site, you need to understand why revisions are needed in the first place.

Why Are Revisions 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.

How To Delete Post Revisions In WordPress Site

How To Delete Post Revisions In WordPress Site

You can delete the post revisions in a WordPress site with two methods,

Manually Delete Post Revisions

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.

1). 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

2). In the cPanel go to phpMyAdmin under Databases and Click on it.

cPanel Click On phpMyAdmin

3). After going to phpMyAdmin, Click on your website database from the left column.

Click On Your Database

4). After your database tables load in the right column of phpMyAdmin, Click on the SQL tab from the Top Menu.

Click On SQL

5). Run the QUERY given below for deleting all the revisions from the database by clicking on Go.

DELETE FROM wp_posts WHERE post_type = "revision";
Enter And Run The Query

6). The query will delete all the revisions from your database. The result is shown below.

Revisions Removed

Delete Revisions By Using A Plugin

For deleting the post revisions we are going to use WP-Optimize plugin.

1). In the WordPress dashboard go to Plugins => Add New. Install and activate the WP-Optimize plugin.

WP Optimize Plugin

In case you don’t know how to install & activate a WordPress plugin, check out our post on, how to install and activate a WordPress plugin.

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

2). 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.

WP Optimize Clean All Post Revisions

This will clean up your database and get rid of all the post revisions that were stored there.

Conclusion

Now that you know how to delete post revisions in WordPress site, which method to utilize is completely up to you.

Both the methods are effective, so choose any method your want, but my advice for beginners is to use WP-Optimize plugin.

Clean your database regularly and get rid of posts revision from time to time. This will really help you in making your website run faster.

Leave a Reply

Your email address will not be published.

Scroll to Top
Copy link
Powered by Social Snap