Support » Fixing WordPress » How to limit revisions?

  • Dear WordPress team,

    How can I limit post and page revisions to a certain number?
    How can I delete old post revisions except for the latest ones?

    I have tried several plugins, they don’t work. And I would prefer a solution built in WordPress Core for that.

    Thanks,
    Nicole

    • This topic was modified 3 months, 3 weeks ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic
Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Steve Stern (sterndata)

    (@sterndata)

    Forum Moderator & Support Team Volunteer

    See https://wordpress.org/support/article/editing-wp-config-php/#specify-the-number-of-post-revisions

    If you set the limit to, say, 5 then if there are more than 5 revisions for a given post, oldest will be removed, but only when you edit that post. You can use a plugin like wp-optimize to remove more than X revisions globally.

    Thread Starter nmschaller

    (@nmschaller)

    Thank you, Steve,
    I had found the possibility to edit the config, but I am not comfortable with that as I am not a developer and usually only use the WordPress surface. If I set that up in config, would the older revisions that exist be deleted? Or would this only have an effect from now on?

    Also, I may want different settings for different types like course lessons or pages, or delete old revisions manually when I know I don’t need them anymore.

    WP Optimize is one of the plugins that did not delete the old post revisions.
    Best,
    Nicole

    Moderator Steve Stern (sterndata)

    (@sterndata)

    Forum Moderator & Support Team Volunteer

    If you set the limit to, say, 5 then if there are more than 5 revisions for a given post, oldest will be removed, but only when you edit that post. You can use a plugin like wp-sweep to remove more than X revisions globally.

    There’s no way to set revisions by post content.

    Thread Starter nmschaller

    (@nmschaller)

    Thank you, Steve. I’ll try that.

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