Support » Fixing WordPress » Disabling Post Revisions

  • Personally, I am not a fan of Post Revisions as I am the only author of my blog and the 2nd reason is that it is taking too much space as every revision is a new row in wp_post table. In no time the post ID would be huge.

    To disable Post Revisions, Add: define('WP_POST_REVISIONS', false); into wp-config.php

Viewing 11 replies - 1 through 11 (of 11 total)
  • 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.

    Thread Starter Lester Chan


    I put up a small tutorial here on how to turn post revision off in 2.6



    Ahh…Gamerz: I’m not sure if your fix is working. The IDs are still jumping whenever I edit something. I think all it does is to take away the “Post Revisions” portion from post.php. =/

    And even auto-saves are now being assigned their own IDs? (Besides prolonging the autp-save interval.) This is bad. =( Is there a quick fix we could use to undo this? (ie. go back to the 2.5 way of doing things.)

    Thread Starter Lester Chan


    The ID are skipped because the ID has been used and deleted (if you run the query). ID will not get repeated even it is deleted.

    You can always use a quick and dirty plugin I wrote called called No Revisions. It doesn’t get rid of the old revisions, but it stops new ones from being created. No wp-config.php editing needed.

    I’ve created three plugins using the solutions by GamerZ and Untwisted Vortex:
    Disable Revisions and Autosave plugins

    You can easily deactivate Revisions, Autosave or both of them at the same time.

    Thanks lads.

    Thanks, Gamerz! 🙂

    Personally, I’m still confused as to why the revisions option isn’t opt-in/disabled by default, and would disagree with the idea that this is an ‘advanced’ setting that doesn’t belong in the admin panel.

    You might also like to try out – WP-CMS Post Control, it allows you to turn on/off post revisions, autosave, change the uploader from Flash to HTML and turn on/off every aspect of the write page… very good!



    why on earth would wordpress decide not to give us the choice of whether we want revisions or not? It is a complete waste of resources and right now I’m stuck and can’t figure out how to move forward.

    I have a fairly large table with data in a post that I edit sometimes 3 or 4 times a day. Its at the point now where I can no longer edit the post because it seems like wordpress is trying to compare my post with every revision resulting in a 30 sec timeout as seen here:

    Fatal error: Maximum execution time of 30 seconds exceeded in /mnt/w0001/d46/s17/b02e53cb/www/wp-includes/wp-diff.php on line 287

    I ran a query on my database to delete everything that had post_status=’revision’ which successfully removed the revisions however i STILL cannot access this post to edit it.

    I tried the many plugins and code hacks to disable revisions and they dont actually disable the revision feature.. it seems like they just hide the revisions from your posting options. The reason I say this is because with the plugins/hacks to disable revisions, after creating a new post with a large table in it and making about 10-15 changes to it saving after each one I eventually get the wp-diff.php error. So the revisions are still being created, wordpress is still comparing them and still failing.

    My only option now with this post is to go directly into my database, copy the content, and create a new post out of it. Then I can edit that one a couple of times until I hit the limit again, and create a new post again.. cycle continues.

    If anyone knows how to completely remove post revisions from WordPress please let me know otherwise I’ll simply downgrade back to 2.5 and stay there.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Disabling Post Revisions’ is closed to new replies.