Back to Top

How to disable Post Revisions in WordPress?

Disable Post Revisions in WordPress

As i have explained yesterday in post POST AUTOSAVE INTERVAL IN WORDPRESS,When you add/edit the post or pages, wordpress automatically save your content in database in some intervals so admin can’t lost changes in any failure.

WordPress auto save versions of content as a revisions in the posts table. Yesterday I have explained that how we can manage this autosave interval in wordpress.

Today I am going to explain about to disable post revisions or limit the numbers of revisions per post in WordPress without making any changes into WordPress core file.You can manage this with the constant provided by wordpress in adding into wp-config.php file.

Let’s see the code snippet to limit the the number of revisions or disable the post revision.

Limit the Number of Revision:


define('WP_POST_REVISIONS', 2);// This will save 2 revisions of any posts/pages.

Disable Post Revisions:


define('WP_POST_REVISIONS', false ); // This will disable wordpress post revisions feature.

Suggested Reading:

To import terms from csv in wordpress
Cron jobs in WordPress
SSL with WordPress

By Default this constant value in wordpress is TRUE.

Hope this tricks helpful to you.As always, thanks for reading an article. Don’t Forget to Follow us on Twitter or Subscribe us to Get the Latest Updates.

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.

Most Popular Posts

Understanding CSS3 Pseudo-elements

Posted on 3 years ago

Bhumi

How to parse the JSON string using jQuery

Posted on 6 years ago

Bhumi

To learn MySQL PACK_KEYS with example

Posted on 4 years ago

Bhumi

How to set 301 Redirection in PHP

Posted on 4 years ago

Bhumi

The Reader’s Poll – June 2015

Posted on 3 years ago

Bhumi

The Reader’s Poll – August 2014

Posted on 4 years ago

Bhumi

The Reader’s Poll – June 2014

Posted on 4 years ago

Bhumi

The Readers’ Poll – May 2014

Posted on 5 years ago

Bhumi

The Readers’ Poll – August 2013

Posted on 5 years ago

Bhumi