WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I define the maximum number of revisions on a per-post type basis?

For example posts have 3 max revisions where as pages have a max of 10.

share|improve this question
up vote 3 down vote accepted

I might be wrong, but my first guess would be that this is not easily possible, because number of revisions gets saved into constant and does not seem hook-able.

From quick search relevant checks are in wp_save_post_revision() and it's very rigid.

share|improve this answer
Thanks Rarst, back to the drawing board~ – mattrepublic Jul 3 '11 at 15:17
What about remove_post_type_support() to remove support from built-in post types? – Q Studio May 7 '15 at 17:41
@QStudio that seems like a distinctly different question? Not sure on top of my head... – Rarst May 7 '15 at 17:55
Right - jumping between question and found an answer to what I needed - but this is not the answer to this question - sorry! – Q Studio May 7 '15 at 18:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.