Disable WordPress Autosave

For some time now WordPress has had this rather annoying feature called Autosave that will save copies of each edit made to a post or page at some predetermined interval. I say annoying because I don’t use it and there are numerous plugins and posts dedicated to turning this feature off. None of which seem very effective. I suppose, if you’re some kind of hardcore editor the autosave function can be a life saver, or if you tend to write 1000 word posts then having an autosave function might be worth your while, but overall it just gets annoying, not to mention how badly it clutters up your database.

For whatever reason, the WordPress 3.x series still doesn’t feature an option to turn this off via wp-admin. Not sure why. At any rate, there is a very easy way to turn the autosave feature off. All you have to do is add the following line to your wp-config.php file.

define('WP_POST_REVISIONS', false );

Add it to the bottom of your config file and save. Simple as that.

Oh and if you don’t completely want to turn it off you can also specify how many times it saves. Simply add to your wp-config.php file:

define('WP_POST_REVISIONS', 3);

where the number 3 is the amount of times you wish autosave to save your post.