Yogesh Chauhan's Blog

How to update or disable WordPress Post Revisions?

in WordPress on December 30, 2021

Similar Posts:

An Introduction to wp-config file in WordPress

How to modify AutoSave Interval using code in WordPress?

WordPress saves copies of post and page edits as you make them.

In fact, there is a whole version history available for each post and page which makes it really easier to revert back to the previous saved version.

How to Disable Post Revisions?

This is how you can disable post revisions in WordPress:

Add this code in wp-config.php file.


define( 'WP_POST_REVISIONS', false );

By default, WP_POST_REVISIONS value is set to true which enables post revisions.

How to specify the Number of Post Revisions?

If you think WordPress is creating way more revisions than you’d want it to create then you might want to specify a lower number for saved post revisions. It helps with your database since there will be a fewer revisions and less data to store.

We can use the same code above but rather than false, we can specify the number of revisions.


define( 'WP_POST_REVISIONS', 2 );


Most Read

#1 How to check if radio button is checked or not using JavaScript? #2 How to add Read More Read Less Button using JavaScript? #3 Solution to “TypeError: ‘x’ is not iterable” in Angular 9 #4 How to uninstall Cocoapods from the Mac OS? #5 PHP Login System using PDO Part 1: Create User Registration Page #6 How to Use SQL MAX() Function with Dates?

Recently Posted

#Jan 17 4 advanced ways to search Colleague #Jan 16 Colleague UI Basics: The Search Area #Jan 16 Colleague UI Basics: The Context Area #Jan 16 Colleague UI Basics: Accessing the user interface #Jan 14 How to display a student’s individual transcript in Colleague? #Jan 11 How to install PuTTY on a MacOS?
You might also like these
Values and Types Basics in JavaScriptJavaScriptA few HTML coding standards from WordPressHTMLHow to implement NSNumberFormatter in Swift for currency?SwiftWordPress: How to display fields from ACF Flexible Contents?WordPressWhat is Object Mutability in JavaScript?JavaScriptThe Sort and Compare Functions in JavaScriptJavaScriptFor Each Loop in Swift for BeginnersSwiftUnderstand Inheritance in PHP in this Basic Example (For Beginners)PHPWhat is the difference between let and var in Swift?SwiftWhat is React? Learn the basicsReactasync function in JavaScriptJavaScriptHow to update or disable WordPress Post Revisions?WordPress