Make WordPress Core

Opened 12 years ago

Closed 11 years ago

#13975 closed enhancement (wontfix)

Limit default number of revision

Reported by: scribu Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Revisions Keywords: has-patch 2nd-opinion
Focuses: Cc:

Description

Currently, WP_POST_REVISIONS is set to 'true', which means that a post can have an infinite number of revisions.

Most users, which don't need to save every revision, are not aware that they should set WP_POST_REVISIONS in wp-config.php to avoid needless database clutter.

Power users are more likely to notice that they need more revisions and go off to find a plugin or to set WP_POST_REVISIONS to a higher value.

Attachments (1)

default_revisions.diff (399 bytes) - added by scribu 12 years ago.

Download all attachments as: .zip

Change History (15)

#1 @jeremyclarke
12 years ago

+1 on this, though I would support it going even lower. 20 feels like a nice round number that few people would be offended by.

#2 @jeremyclarke
12 years ago

  • Cc jer@… added

#3 @ericmann
12 years ago

  • Cc eric@… added

@jeremyclarke +1 for a lower number. 30 seems almost too large (I've rarely seen more than 15 revisions for any one post).

#4 @ocean90
12 years ago

  • Milestone changed from Unassigned to Future Release
  • Type changed from defect (bug) to enhancement

25-30 sounds good.

#5 @jeffr0
12 years ago

I still feel that users should be able to determine how post revisions will behave and not be given a strict amount. But then, this requires some sort of additional option UI to be added which is why it was dismissed when Post Revisions were introduced. So my question is, even though this would limit it to 30 post revisions per post, maybe someone only wants 5 or 10. They would be stuck having to edit wp-config anyways, right? Or using the Revision Control plugin?

#6 @scribu
12 years ago

@jeffr0: yep.

#7 @kpdesign
12 years ago

  • Cc kpdesign added

I'd rather see a much smaller number than 30 for the default. I've got them turned off on all my WordPress installs via the wp-config.php file except for one, and I set that one for 5 revisions.

How about setting the default to 10, and let the user increase it if they feel they need to?

#8 follow-up: @nacin
12 years ago

I agree unlimited seems large, that 30 seems large, that 20 seems large. But is changing the default value appropriate? Some organizations could very well be relying on unlimited revisions, which has always been the default, and suddenly changing that seems like a bad idea.

#9 @chipbennett
12 years ago

  • Cc chip@… added

No more than 10, by default.

Who, honestly, has made use of any post revision older than 10? (Show of hands? Anyone? Beuller? Beuller? Beuller...?) And if you have done so, how often? Several times? A few times? Just once?

Has any user testing been done on this feature, or are use cases just guessed/assumed?

IMHO, the database bloat caused by unlimited post revisions *far* outweighs any potential benefit provided by post revisions. (Of course, I don't see much benefit to them at all, which is why I've disabled them.)

And whatever the case, +1 for the assertion that this setting *absolutely* needs to be exposed in the UI, and not dependent upon a wp-config setting.

Need to clear some UI bloat in order to accommodate Post Revision settings? How about removing this, in its entirety:

"Press This

Press This is a bookmarklet: a little app that runs in your browser and lets you grab bits of the web.

Use Press This to clip text, images and videos from any web page. Then edit and add more straight from Press This before you save or publish it in a post on your site.

Drag-and-drop the following link to your bookmarks bar or right click it and add it to your favorites for a posting shortcut.

Press This"

(Seeing as how not a single bit of that is a *setting* in the first place.)

And note also that what immediately follows the above, will soon be gone in its entirety as well, when post-by-email becomes a core plugin:

"Post via e-mail

To post to WordPress by e-mail you must set up a secret e-mail account with POP3 access. Any mail received at this address will be posted, so it’s a good idea to keep this address very secret. Here are three random strings you could use: 9Ldsq1DD, 1rXMTCZt, rkclP9rJ.

Mail Server	 Port 
Login Name	
Password	
Default Mail Category	"

So, that's about half of the current content of the options-writing.php page. Surely that will free up enough room for two post revisions options (enable/disable, and # revisions).

#10 in reply to: ↑ 8 @chipbennett
12 years ago

Replying to nacin:

I agree unlimited seems large, that 30 seems large, that 20 seems large. But is changing the default value appropriate? Some organizations could very well be relying on unlimited revisions, which has always been the default, and suddenly changing that seems like a bad idea.

I would suggest that anyone concerned with the health, size, and growth of their WordPress database has already implemented the wp-config option to limit post revisions, anyway.

Also, this could easily be implemented with an update to wp-config-sample.php that is used to generate wp-config files for *new* WP installations - thus avoiding any impact on any current installations.

#11 @nacin
12 years ago

  • Keywords 2nd-opinion added

If WordPress is used for editorial workflow purposes, or in any instance where the complete history of content and how it was changed is imperative to operations, then setting a default now (after not having one) will be a very bad idea. Revisions are in many cases about an audit trail.

I agree with chipbennett's suggestion about wp-config-sample.php, in that this would be the safest way to do this, though not necessarily something I'd prefer to add there.

Yes, when the post by mail plugin is finished, it'll likely set up its own settings panel, which would allow us to remove that section in the next few versions. We just added Press This there, given the probable demise of the otherwise empty tools.php. It's not about the actual size taken up by options. It's their existence.

#12 @gazouteast
12 years ago

  • Cc gazouteast added

Should the UI for enable/disable/quantity of revisions not actually be on a post by post basis anyway?

And, if you're looking for real estate to dump it into, why not alongside the drop down for author on the page/post editor screen - seems far more logical to me.

Regardless of how or where the script is being used, there will be one of two scenarios most of the time -

  1. most articles will need either some or full revision control, but some will need none. (Most likely scenario for corporates)
  2. most articles will need zero revision control, but a few will need either a couple of revisions "just in case" or will need all revisions to be available. (Most likely for the majority of installs).

It therefore makes sense for revision control to be at a per post/page level, not a global buried in wp-config. However, within wp-config, for server resource management purposes ONLY (!) should be an over-riding global_max_revisions() setting.

Example - This is needed by small blog farms etc on shared servers - e.g. a site for a club or association with a couple of dozen highly non-programming members (e.g. a blue-rinse brigade knitting club sharing patterns and photos of what they knitted). The super admin obviously does not want the entire hosting account getting suspended because of one member posting twenty times a day and creating 20-30 revisions for each post (change tags, category, title, add more images, smilies, etc etc) - it happens, you know it does, go on, admit you do. Seniors who catch the blogging bug have got 18 hours a day to fritter away on such usage - no way a single admin could keep up with an entire gaggle of grannies "bloggiping" together via comments and the like.

Gaz

#13 @dd32
12 years ago

Should the UI for enable/disable/quantity of revisions not actually be on a post by post basis anyway?

I think that'll be going a bit too far for core honestly.

Its one thing to offer a default limit which may be more appropriate than unlimited, but once you start dishing in all those extra's like that, thats where it drops back to plugin material IMO.

At this point, I'd like to pimp my plugin revision control for everything beyond a simple reasonable global default number of revisions.

#14 @scribu
11 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed

No resolution in 4 months. No use leaving this open.

Note: See TracTickets for help on using tickets.