[Resolved] Limit post revisions

Home Forums Support [Resolved] Limit post revisions

Home Forums Support Limit post revisions

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #662702
    Charles

    I know this can be added to php file but wondering if you could please tell me the correct code and location for placement.
    I’d like to limit posts to only 2 revisions.

    Perhaps relevant, I use Elementor pro and have templates for my posts, so delete post history within Elementor. However, many of my posts require updating monthly, so although I remove previous versions within Elementor, wondering if WP still retains older versions.

    Thanks Kindly,
    Charles

    #662845
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    I believe you just need to add this to your wp-config.php file:

    define( 'WP_POST_REVISIONS', 2 );

    This is a great article on post revisions: https://kinsta.com/knowledgebase/wordpress-revisions/

    #663923
    Charles

    Thank you kindly, Tom.
    Regards,
    Charles

    #664485
    Tom
    Lead Developer
    Lead Developer

    You’re welcome! 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.