Limit the number of revisions per post type

Limit the number of revisions per post type

In the functions.php file add these lines:
<?php
add_filter('wp_revisions_to_keep', function($num, $post) {
    return $post->post_type === 'page' ? 3 : 10;
}, 10, 2);

Fewer revisions for static pages, more flexibility for posts.