Limit Wordpress revisions of Pages and CPT without plugin

135 Views Asked by At

I am creating this question both to answer it for myself, but also to help others who might find the same issue, as I cannot find a single article about this online.

I have been using the below code, within the wp-config.php file for some time now, but have only recently noticed it doesn't work universally - it only works for 'posts'. I would like to enable the same setting for both pages and custom post types.

Does anybody have any information regarding this?

/** limit post revisions to prevent db bloat */
define( 'WP_POST_REVISIONS', 5 );
1

There are 1 best solutions below

1
Alex T On

In my installations it works universally. This discussion confirms my experience: http://pods.io/forums/topic/revisions-support/