There are a few methods to disable autosave/revisions.
Disabling autosave:
- Using action and dequeuing the .js that is responsible for autosave, this goes into
functions.php
, located in the current theme directory.
function bt_disable_autosave () {
wp_deregister_script('autosave');
}
add_action('admin_init', 'bt_disable_autosave');
- Using a constant to set the interval so high (one day) it will never happen unless you leave the browser open for that long, this goes into the
wp-config.php
, located in the root of the wordpress install.
define('AUTOSAVE_INTERVAL', 86400);
Disabling/limiting revisions:
- Limiting revisions using a constant, this goes into the
wp-config.php
, located in the root of your wordpress install.
define('WP_POST_REVISIONS', 3);
- Disabling revisions, this is the same as the above, you just set it to 0 instead.
define('WP_POST_REVISIONS', 0);
// or
define('WP_POST_REVISIONS', false);