How To Disable Post Revisions (or Limit Post Revisions)

Let’s assume that you have some kind of huge fashion blog or a news website in WordPress CMS with over hundreds of authors. The website got thousands of posts. We all will update posts regularly. For keeping the content fresh and for showing the updated date on search engines.

But when you do that, a revision of the updated post is getting saved on your database. This could slow your website down. In our case, we have got disabled the post revisions on our blog and got limited them for clients websites. A few days back, someone got asked how we did it.

In this post, we will show you that how to disable post revisions in WordPress or limit them. So, you could get a faster website. Most folks will rely on a freelancer for this. Trust me. This is pretty simple that you thought.

Pros of Disabling Revisions

Like I Said, Improve Website Speed.Clean Database.

Cons of Disabling Revisions

You Won’t Be Able To Update Posts From Revisions.

Now, you have the idea. Let’s see how to disable or limit the post revisions.

How To Disable Revisions in WordPress

You need to access your website’s wp-config.php file. This can be found in your WordPress installation directory. If you installed WordPress in your root domain, you can see the wp-config.php file in the public_html folder.

You could use an FTP client for accessing the website’s file manager. Or, you can also use the cPanel for accessing files. In my case, I have connected FileZilla, an FTP client to my WordPress website and downloaded the wp-config.php file to my computer.

Now, copy the below code.

 
//disable WP Post Revisions
define('AUTOSAVE_INTERVAL', 300); // seconds
define('WP_POST_REVISIONS', false); 

Paste it on the wp-config.php file, just before the “That’s all, stop editing” line. See the screenshot from below.

disabling wordpress post revisions

You need to save the file and upload it to your root. You will be asked for file overridden. SImply overwrite the file. This is how you can completely disable the post revisions in WordPress blog. Some folks need to limit the revisions instead of disabling it. If you want to limit the, follow this guide.

How To Limit Revisions in WordPress

All you need to do is, modify the code. The same method that we followed above. No change. When you paste the code in your wp-config.php file, use the below code.

 
//Limit WP Post Revisions
define('AUTOSAVE_INTERVAL', 300); // seconds
define('WP_POST_REVISIONS', 3);

Paste the code in the wp-config file and upload it to your file manager. The above code, we specified 3 revisions of the post. You can change it to any value that you want. 3 is a decent amount.

If you didn’t set a limit, you will get unlimited revisions. As I said, this could slow your website down, affect your entire revenue especially if you are using WooCommerce.

Plugin Method

Last day, we have shown you a plugin called Perfmatters and written a detailed Perfmatters review. This plugin got options for disabling the post revisions. All you need to do is, install and activate Perfmatters plugin and go to the plugin settings.

This can be found under the WordPress settings. There, you can see an option for disabling or limiting the post revisions feature.

post revision settings in perfmatters

Choose an option from the drop-down and save the plugin settings. In this way, you don’t need to add codes to your WordPress core files and you can simply change this anytime you want.

This is how you can disable post revisions or limit them in WordPress. We hope you found this post helpful and enjoyed the read. If you did, please consider sharing this post with your friends and fellow bloggers. Also for more posts, you need to check out our blog section.

If you are planning to improve your website speed, consider a caching plugin like WP Rocket and a performance optimization plugin like Perfmatters. Both will work best.

Leave a Comment