Rabbit

Tutorials

How to limit the number of post revisions in WordPress

Every post revision is stored by default in WordPress. However, a limit can be set by defining a constant in wp-config.php.

define( 'WP_POST_REVISIONS', 3 );

You can also disable revisions entirely by setting the value of WP_POST_REVISIONS to 0.

define( 'WP_POST_REVISIONS', 0 );

Revisions are stored in the wp_posts table with a post_status of inherit and a post_type of revision. Regular revisions are distinguished from the autosave revision by the post_name field.

Posted by on .

0 comments

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>