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,
- How To Optimize Images For Your Website Or Blog
- How To Create A Site Map For Your Website
- Best WordPress Plugins For Internal Linking Of Website
Delete Post Revisions In WordPress
You can delete the post revisions in WordPress by two methods
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.
- 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.
- 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";
- The QUERY will delete all the revisions from your database. The result is shown below.
This is the easiest way for someone who has bit of a knowledge about phpMyAdmin and the backend.
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.
- 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.
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.