I want to clean up my WordPress database and delete some post revisions.
But I only found plugins or code to delete all revisions. But this is not, what I want. I want to keep revisions with major changes. That means only revisions saved within a short time period should be deleted. If the last revision date is not within a certain time period, it should not be deleted.
E.g. I wrote a post a year ago and created 3 revisions. Half a year later I edited something and again created 4 revisions. The intelligent cleanup I'm looking for should clean the 2 older revisions when creating the post and the 3 when editing it. Only the last changes should remain.
The logic could be: Only delete the revision before the current revision, if it's not older than a week.
Is there a plugin out there or a code, that does such an intelligent clean up of revisions?