WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#42712 new feature request

Enhance wp revisions to keep with expiration date for the revisions

Reported by: colomet Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Revisions Keywords:
Focuses: Cc:
PR Number:

Description

https://codex.wordpress.org/Revisions

Now, the options of the revisions are:

true (default), -1: store every revision
false, 0: do not store any revisions (except the one autosave per post)
(int) > 0: store that many revisions (+1 autosave) per post. Old revisions are automatically deleted.

What about to have expiration by time also, not just with number. In that way, in big multisite installations, old revisions could desappear after X months. Decreasing the size of the database.

Normally, if a post have not modifications after 1 year, is because not longer are necesary. Anyway, it would be a choice of the superadministrator of the installation.

thanks

Change History (2)

#1 @knutsp
2 years ago

  • Component changed from Text Changes to Revisions
  • Version 4.9 deleted

+1
The number of revisions, as a limit, is quite daft. Who can say what that number should be on an installation, even given the workflow?

The age of a revision is much more important than it's number, when deciding if it could be automatically deleted.

The functionality may be seen as plugin material, but core should provide automatic deletion also on basis of the age.

#2 @dd32
2 years ago

The age of a revision is much more important than it's number, when deciding if it could be automatically deleted.

That's very subjective, personally I might want at least the last 5 revisions of any given post, for example, when I find out that the post was modified after I published it.
Others might not care about revisions before publishing, but revisions after publishing is super important.
And then this use-case, I don't care about backups/revisions older than 1 month, just purge them then.

The functionality may be seen as plugin material, but core should provide automatic deletion also on basis of the age.

I actually feel like this would be great as a plugin first, even if it only ends up as a POC.
I don't think revision purging should've ever been part of core - and I say that as the author of a plugin (Revision Control) which I wish I never wrote :)

Note: See TracTickets for help on using tickets.