Automatically Limit Post Revisions In Wordpress Post

Let me start this article with a question. Do you care about your web hosting server and data base size? If yes then this article is for you. One of many ways you can do to keep a clean wordpress database is to limit post revisions in your wordpress site.

Having a clean database can also help your server load even faster. So in this article, you will learn how to limit post revisions in your wordpress site. And while wordpress post revisions are important to some people, it may not be important to you. So, in this article, I will also share about how to completely disable post revisions in your wordpress website.

But before we go any further, let’s first take a quick glance about what post revisions or wordpress post revisions is really all about.

What Is Post Revisions & Why Do We Need To Limit Post Revisions In WordPress

WordPress post revisions is a very handy feature implemented in wordpress so that webmasters, bloggers or writters can undo any kind of changes made while writing or updating a post to be published.

In simple terms, if you are currently writing an article and have deleted some text or something that is important inside wordpress editor, you can still retrieve what you have deleted by just clicking on the undo button located at the upper left corner of wordpress editor. And if you are not satisfied with the undo button, you can just click on the revision icon located at the right side of your wordpress gutenberg editor like the ones shown below:

limit wordpress revisions - undo button
Limit Post Revisions - Revisions Icon

By clicking on undo button, you will be reverted back to your previous draft. And by clicking on revisions icon like what is shown above, you will be able to see some previous history of your drafts. You can have the option to choose which drafts you want to be reverted back to.

ALSO READ:  How to Write a Killer Blog Post in 30 Minutes or Less

But compiling a lot of unused post revisions can cause your database size to increase fast. Imagine this question, how many blog posts do you have in your wordpress site? Is it 50? 100? 200? or 1,000?

Another question to be considered is, do you know that in every single post that you published in your wordpress site, it always has post revisions compiled in your database?

Please be reminded before we published an article in our website it always underwent double checking and corrects. And in every correction and update we made in our article it adds another version of draft post saved in revision history. And remember, this is just for a single article.

Now if you have more than a hundred articles in your wordpress site and if each article post you have has a revision of at least 5, then I can say that you have more articles saved as draft revision files in your revision history which are clogging your database than your actual number of articles you have in your wordpress site.

This is one of many common reasons why many wordpress sites online are loading very slow. This kind of issue can easily be resolved by limiting post revisions in wordpress. So, below are some very easy steps you can follow to limit post revisions in your wordpress site.

Limit Post Revisions In WordPress Using A Plugin

This is a very easy steps and recommended for beginners. You can definitely limit post revisions in your wordpress site using a plugin. So follow the steps below:

  • Download, install and activate the plugin “Companion Revision Manager“. The reason why this is the one I suggest when it comes to this matter is that because this is a very light-weight plugin. It only weighs about 6kb. When you try to download this plugin in your computer, you will see that it weighs less than 6kb. 5.7kb to be exact.
  • Once, installed just go to the plugin settings.
  • To find the plugin settings, go to tools located on the left panel of your wordpress dashboard.
  • Click on revisions, like the one shown below:
Limit Post Revisions Post Revisions WP Plugin
Limit Post Revisions Plugin interface
  • As what you can see above, if you have successfully activated the plugin, you are now able to limit post revisions in your wordpress site. Just add in the box corresponding to the number of revisions the number of post revisions you want to keep.
  • Next is click on save so that this plugin will start to limit post revisions in your wordpress site.
ALSO READ:  How To Create Engaging Content For Your Wordress Site?

Disable Post Revisions In WordPress

Now, instead of just limiting post revisions in your wordpress site, if you want this feature to be completely disabled, you can do it so. In the same plugin interface, just tick the box next to Disable revisions so that wordpress will not autosave any revision you are going to make in the future. See image below:

Limit Post Revisions - Disable WordPress Revisions

In the plugin interface as what you can see above, you also have the option to delete the existing revisions. In the sample image above, I have 3 existing post revisions. It’s only 3 because it’s my demo site for testing wordpress plugins or themes. But if you have not been deleting your post revisions nor limiting it, you could have more than a hundred existing revisions clogging up your sever, resulting to a very slow website speed.

How To Limit Post Revisions in WordPress Without Using A Plugin

If you have completely read the given steps and instructions above on how to limit post revisions in your wordpress site, then you are already good to go. But if you don’t want to use any kind of plugins to limit post revisions in your site, you can follow the instructions given below: Make sure first to back up your wordpress site before making any kind of changes in your website files located inside your cpanel.

ALSO READ:  Boost Your Site with WordPress .htaccess Caching for Faster Loading

Limit Post Revisions By Tweaking wp-config.php

  • You only need to go to your cpanel.
  • Find your wordpress site’s folder,
  • Inside your site’s folder, find and open up wp-config.php file.
  • Lastly, add this code below to your wp-config.php
define('WP_POST_REVISIONS', 7);

If you want to limit post revisions to 7 then the code above is the right example. You can change it to whatever number of revisions you want.

Disable Post Revisions In wp-config.php

If you have decided that post revision is not important for you, you can completely disable this feature without using any plugin. Just copy the code below and add it in your wp-config.php file. Make sure as well that if you are adding this code below, you are not using the WP_POST_REVISIONS above nor any kind of post revision code inside your wp-config file.

define('WP_POST_REVISIONS', false);


For beginners, it is best to limit post revisions in your wordpress site by following my first example given above, which is by using a wordpress plugin. But for those experienced webmasters, you have the option to follow my second example which is to tweak your wp-config.php file.

If you found this article helpful and useful, please consider sharing this with other people you know who need this.

Similar Posts

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.