WordPress & Post Revisions

There are many things about WordPress that have a catch 22 effect on you; something that you love but drives you crazy at the same time.  One of these features happens to be the post revisions introduced in current version of the CMS.  Post revisions are an excellent concept and I have used it on more than one occasion, however, it gets out of control at times.  When working on an article, I have added and removed content daily resulting in HUNDREDS of post revisions stored in the database.  Here are some ways to manage your post revisions.

One way to manage your post revisions is to simply turn them off.  This is not an ideal situation for myself and for many but the hard reality is that many of us have resorted to this.  Having used the post revisions myself, this was my first solutions.

To disable post revisions you will only need to edit one file, your wp-config.php file in the root of your WordPress installation.  Simply add:

// Disable the post-revisioning feature
define('WP_POST_REVISIONS', false);

For the rest of us, the better option is to limit the number of revisions that will be saved.  Until recently, I didn’t even know this existed but thankfully the forward thinking of the WordPress developers saw the need and implemented a means to accomplish this.  Simply edit the wp-config.php file and add the following:

// Limit the number of saved revisions
define('WP_POST_REVISIONS', 3); // Change the number

Another way to help with your post revisions is to change the interval in which WordPress auto saves the post you are working on.  By default WordPress auto saves your posts in intervals of 60 seconds.  Modifying this value is simple and you can force it in either direction, shorter or longer.  Simply edit your wp-config.php and add the following:

define('AUTOSAVE_INTERVAL', 160); // Change the number - it's in seconds

Note: These functions are not of my own creation, simply things I have found along the way.  If you are the author of this function, please let me know so I can properly credit you with your work!

About Joe D

I have always had a passion for everything computing. In early 2000, I decided to take my passion to the web. Thus, C.O.D. was born. Through the years we have made many great friends at C.O.D. and hope to continue our journey for years to come.

Check Also

Manage Multiple WordPress Sites with InfiniteWP

Running your website, or websites, on WordPress is an easy choice as the flexibility the …

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.