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.

1 Answer 1


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.

  • What about remove_post_type_support() to remove support from built-in post types?
    – Q Studio
    May 7, 2015 at 17:41
  • @QStudio that seems like a distinctly different question? Not sure on top of my head...
    – Rarst
    May 7, 2015 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, 2015 at 18:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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