We developed the perfmatters plugin to speed up your WordPress sites!

How to Disable and Limit WordPress Post Revisions

WordPress Post Revisions

If you are like me than you are a stickler for speed. There is nothing worse than a slow website! One of the ways in which I keep my WordPress websites running fast is to disable post revisions. I never use them and many WordPress hosting companies, like WP Engine, disable this feature to keep your database smaller and your site running fast. Follow the directions below on how to disable WordPress post revisions. There is also an alternate option to limit post revisions.

Step 1

First we will need to open up your wp-config.php file. This should be located in the root of your WordPress site. Please back the file up first.


Step 2

We are then going to insert the following code. You will notice I am also adding a line to change the default autosave interval from 60 seconds (1 minute) to 300 seconds (5 minutes). Note, when you disable the post revisions there is still one autosave per post.

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

This needs to be inserted above the ‘ABSPATH’ otherwise it won’t work.

See my example below.

disable wordpress post revisions

Step 3

Save your wp-config.php file and re-upload it to your server. And your done! The revisions option next to your Publish button will no longer show.

no wordpress revisions

Alternate Option

Maybe you have a client that wants revisions but you want to limit them. You can set a number of revisions. WordPress will keep that number and delete any previous ones. See the alternate code below.

define('AUTOSAVE_INTERVAL', 300); // seconds
define('WP_POST_REVISIONS', 3);

The above code will save only three revisions. If you don’t set a limit you might end up with a lot of revisions over time. See this pic below on a client I was recently working with. They had 129 revisions on one page. The client has about 600 pages… if you do the math that could be an additional 77,400 entries in your database.


Check out my other post on how to delete old WordPress revisions and optimize your database.

As always feel free to comment below!


Marketing, WordPress, Blogging Tips, SEO and Reviews, once a week.

Thank you for subscribing.

Something went wrong.