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
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.
By Default this constant value in wordpress is TRUE.