WordPress.org

Ready to get started?Download WordPress

Forums

2.6 - Turning Off Post Revisions? (12 posts)

  1. davepoobond
    Member
    Posted 5 years ago #

    Okay so i installed 2.6 yesterday, and now that I am posting actual content since then, I see something that irks me and messes up the way I actually use WordPress altogether.

    Post-revisions seem to occupy post-IDs. Whoopee. The thing is, I identify my posts by their post-IDs, and before it was very predictable as to what # they would end up being (just add 1)

    But now, that's not exactly helping me out because it saves revisions seemingly whenever it wants to. I'd like to be able to just turn it off -- is there a way to do that?

    Or at the very least, is there a way to make the post somehow name itself by its Post ID other than manually changing it after its posted?

    Thanks for any help.

  2. hotkee
    Member
    Posted 5 years ago #

    add define('WP_POST_REVISIONS', false); to your wp-config.php

  3. Lester Chan
    Member
    Posted 5 years ago #

  4. davepoobond
    Member
    Posted 5 years ago #

    cool thanks for the solutions guys.

    do i just add it anywhere in the wp-config? or does it have to go before/after something?

    i've never messed around with that config file after i installed, so i don't even know if any new versions have new stuff that I should add to it as well.

    Thanks again.

  5. Anonymous
    Unregistered
    Posted 5 years ago #

    Just add it along with the other define towards the top, that's what I did.

    Right under define('DB_COLLATE', '');

  6. davepoobond
    Member
    Posted 5 years ago #

    GamerZ, i noticed you changed your post to say that Autosaves don't create revisions.

    They do. I had trouble with one of my posts when i tried to publish it that said there was an "autosave" that was more current than the one i tried to publish, and when i looked at the post revisions list for the article, it has one that says "[autosave]" in the post revision title.

  7. Lester Chan
    Member
    Posted 5 years ago #

    @davepoobond That is weird, I tested it on my localhost and for me autosaves does not create a new revisions. Could you investigate further and post it in http://trac.wordpress.org/ticket/7379

  8. davepoobond
    Member
    Posted 5 years ago #

    well, that one guy says that it makes an autosave-revision once, which is "as intended" as he put it.

    so is it as intended or is it just simply that autosaves shouldn't be making revisions at all?

    also, i wouldnt know how to investigate much further other than taking a screenshot of the post revisions list of that particular post (i dont even remember which one)

  9. Lester Chan
    Member
    Posted 5 years ago #

    Here is what I did:

    1. I type some text
    2. Press the save button (a revision is saved)
    3. Change the text
    4. Wait for it to autosave
    5. Exit my browser
    6. Check back the post

  10. jrawle
    Member
    Posted 5 years ago #

    Autosaves may not save "revisions" as such. But when you edit an existing post, autosaves are stored as a duplicate copy of the post, one for each post that you've edited. You can prevent this by increasing the time before an autosave to something very large:

    define(’AUTOSAVE_INTERVAL’, 600000);

    It's a bit messy, I know, but it does stop it. The only automatic save is then the one that occurs a few seconds after starting a new post. That does create a row in the posts table, but it'll be the row that becomes the final post, rather than an additional one. This initial save is still a nuisance if you open the editor but then decide you don't want to write after all.

  11. ninjaboy
    Member
    Posted 5 years ago #

    A much more elegant solution si to use the WP-CMS Post Control plugin over at http://wordpress.org/extend/plugins/wp-cms-post-control/ - it gives you the ability to turn off post revisions through an admin page, along with autosave and a whole bunch of other cool stuff to do with the write panel!

  12. GrandSlambert
    Member
    Posted 5 years ago #

    Old post I know, but thank you ninjaboy for this suggestion. I am using WPmu 2.7 in an Intranet and managers who post were sitting on the screen for a while, or leaving it up while they went into a meeting and just filling up the database! Now one record per post - don't need revisions or autosaves, and this plugin works. Of course, now I need to clean up all the extra records, but that I can handle!

Topic Closed

This topic has been closed to new replies.

About this Topic