Autosave and revisions in WordPress

WordPress by definition performs automatic saves of each post being currently edited and also, for each post update, it creates a revision. This enlarges database and sometimes can make life a little bit harder, because both WordPress and browser can get a little bit wako on any of these mechanisms. So, here is a quick way of disabling these features.

This post is based on Revision Management in Wrodpress Codex. Refer to it for details.


Automatic post saves happens each 60 seconds as you type (or not), but there is always only one version of autosave for each post. New autosaves overwrite old ones. This means that your tables is not growing by one row every 60 seconds.

Autosaves are enabled for all posts and pages and are so useful according to WordPress creators, that there is no way to disable them.

Revision Options

In addition to autosave functionality WordPress also creates a new revision of each text, each time you hit Publish or Update buttons. If you’re perfectness-ill person and hit these buttons many times, to check even tiny thing, you may soon wake up in the world, in which each of you posts has 10-20 or more revisions. This may increase your database size significantly.

To disable this feature (hopefully, this is possible), make use WP_POST_REVISIONS constant and set it in your wp-config.php file (or by a plugin) to:

  • -1 (true; default) — store every revision,
  • 0 (false) — do not store any revisions (except one autosave per each post),
  • >0 — store that many revisions (+1 for autosave) per post. Old revisions are automatically deleted.

Leave a Reply