Just so everyone is clear… auto-save, post revisions and auto-draft are three separate things. There are way too many posts about this but I just decided to write here since this is a recent thread.
The wp-config.php defines of
define( 'AUTOSAVE_INTERVAL', 86400 ); // in seconds: 86400 = 1 day
define( 'WP_POST_REVISIONS', false); // false means turn off saving of revisions
takes care of the the first two, but the auto-draft post_status should be ignored and does not need fixing.
The auto-draft post_status was put in there as background housekeeping for all the random ways a post/page can get edited or attached to before saving as draft or published so nothing gets lost.
It is your invisible friend.
The good news is that it looks like wordpress core now has a built in function to daily, automatically remove posts with post_status = ‘auto-draft’ that are over a week old. The code below is in post.php:
/**
* Deletes auto-drafts for new posts that are > 7 days old
*
* @since 3.4.0
*/
function wp_delete_auto_drafts() {
global $wpdb;
// Cleanup old auto-drafts more than 7 days old
$old_posts = $wpdb->get_col( "SELECT ID FROM $wpdb->posts WHERE post_status = 'auto-draft' AND DATE_SUB( NOW(), INTERVAL 7 DAY ) > post_date" );
foreach ( (array) $old_posts as $delete )
wp_delete_post( $delete, true ); // Force delete
}
Alos, in the file post-new.php there is this code:
// Schedule auto-draft cleanup
if ( ! wp_next_scheduled( 'wp_scheduled_auto_draft_delete' ) )
wp_schedule_event( time(), 'daily', 'wp_scheduled_auto_draft_delete' );
I’m not quite sure how they are connected, but I’m betting all those ‘auto-draft’ posts are fairly recent and will get purged with no sweat on our part.