• Hi!
    I don’t like the “Post Revision”-Feature at all because it creates a alot of useless database-entries.. Can anyone please tell me how to turn it off? I’ve tried to comment out some related functions but since my latest SVN-update on 12th May WordPress starts creating revisions again..

    Just an idea: Would be great to turn that feature off in the Options/Write-Settings…

Viewing 15 replies - 1 through 15 (of 56 total)
  • Thread Starter onkelandy

    (@onkelandy)

    At least I figured out how to prevent the automatic ajax-revisioning. In wp-ajax.php is the following code:
    if ( $do_autosave ) {
    // Drafts are just overwritten by autosave
    if ( ‘draft’ == $post->post_status ) {
    $id = edit_post();
    } else { // Non drafts are not overwritten.

    By commenting out the relevant lines it’s possible to have some neat autosave while editing existing posts without creating revisions all the time (ouch, they really suck…)

    To avoid revision-saving on clicking the “save”-button it is necessary to comment out the line //add_action( ‘pre_post_update’, ‘wp_save_revision’ ); in default-functions.php

    Are there any more elegant ways to achieve this..?

    Thread Starter onkelandy

    (@onkelandy)

    The specific files are “admin-ajax.php” in wp-admin and “default-filters.php” in wp-includes. Sorry for the mistake.. but I’m talking to myself anyway πŸ˜‰

    In my little opinion, there should be an option in general or writing settings to enable/disable the post revision feature

    Strongly agree. I can see its use for multiple authors but for me, it simply generates annoying unwanted database entries.

    I can’t even see yet how to delete unwanted revisions.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Why would you ever want to delete a revision? That makes little sense to me. But then, I don’t understand wanting it turned off either. If you don’t want to use it, then don’t.

    I bet you’re the kind of person who actually manually goes through and deletes old email too, right? You really have to get over this “it takes up space” thing. Space is cheap and virtually unlimited. πŸ™‚

    But… I think define('WP_POST_REVISIONS', false); in wp-config will disable them.

    But… I think define(‘WP_POST_REVISIONS’, false); in wp-config will disable them.

    AFAICT that would also mess with the drafts (e.g. not saving edits)…at least it did as I tried that…

    As for the “why do it in the first place”-part…well, I for one couldn’t care less about the space it might take up in the db…but I got other problems with this feature:

    1. It foobars some of my plugins (e.g. twitter updating ones which will fire for both the “final” as for the “inherited” revision)…any hints on how you can differentiate between those at post time?

    2. I don’t see anything to use the revisions…yes they’re present in the db, but there’s no (G)UI element for them (e.g. to restore/go back one revision on a post)…or am I missing something?

    define(‘WP_POST_REVISIONS’, false);

    Doesn’t work. Large unwanted posts are simply added following every minor revision. My database has grown massively.

    “I bet you’re the kind of person who actually goes through and deletes old email too, right?” – Well, surprisingly yes; since I receive tens a day that makes very good sense.

    This is a very blase approach that has resulted in the worst ever WordPress version change. The number of stored Revisions (0 in my case) should at very least be controllable. Quadrupling the size of my database with unwanted posts makes 2.6 unusable and already, my phpadmin imports (controlled by my host not me) have to be split into sections.

    Bloody infuriating mess up of a blog tool I have always revered. I will try to revert to 2.5 until it is ‘fixed’.

    Otto, let’s say you have 1000 posts, and in the process of your authors making those posts, they each make 5 changes. Suddenly you have 5000 items in the database. WordPress is notorious for using poorly indexed database files, which means there will be HUGE queries. Basically, this takes an existing issue (wordpress slows significantly past 10,000 posts) and makes it X number of times worse.

    Revisions should be written to a seperate table where they aren’t in the way of normal queries.

    After every session, I run clean-up SQL:
    Delete from wp_posts where post_type=’revision’;

    It is hopefully a temporary inconvenience until some control is given to revisions; at the moment, it is an abortion.

    It is another one of those mystery functions: It might be a good idea for some, but there isn’t any reason why it shouldn’t be optional.

    My apologies, define (‘WP_POST_REVISIONS’, 0); DOES work.

    When I tested, I was confused by the new auto_save which happens as a single ‘revision’. I would rather not have this either but I can live with it; my main problem is that because of the nature of my site, large posts receive many minor revisions.

    Yo! Now I am happy.

    By running clean-up SQL:
    > Delete from wp-posts where post-status=’revision’
    and adding to wp-config:
    > define (‘WP_POST_REVISIONS’, 0);
    > define(‘AUTOSAVE_INTERVAL’, 600); // One hour should be long enough!

    I don’t get masses of large unwanted duplication and I can simply click Save whenever I want to without having everything duplicated with unwanted auto-saves every minute.

    It was BAD judgement that the majority of users would love this extra database content.

    Same issue happened with the more tag in posts via rss, functionality was removed or significantly changed without reason, when this would be something best left for people to choose. I can’t imagine it being very difficult to add in a “do you want to use post revision history” as an option in settings.

    (oh otto, this isn’t whining… it is constructive. When in doubt, programmers should always offer options rather than hardcoding their personal preferences into things. The options harm nothing)

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    I can’t imagine it being very difficult to add in a “do you want to use post revision history” as an option in settings.

    No, it would not be difficult at all. It is, however, totally unnecessary as having post revisions has no downside to it.

    The options harm nothing

    Excessive and useless options harm usability and make systems confusing.

Viewing 15 replies - 1 through 15 (of 56 total)
  • The topic ‘Turn off “Post Revision”-feature’ is closed to new replies.