WordPress 2.6 is out and every wordpress user is busy upgrading to the latest version. I already did a review of wordpress 2.6 features here.One of the features, that I felt, should have been an optional one for the wordpress user is “Post Revisions“.
WordPress 2.6 has also introduced this annoying auto save feature, that automatically saves posts at regular time intervals.This would also lead to additional post revision entries in your wordpress database (wp_posts table).
In notime, you would find your wordpress database bloated.In the long run, this would not only affect performance but would also lead to increased download times of your wordpress database backups.Ideally wordpress 2.6 should have provided these as optional features, making it easy to turn them off, through settings in wordpress administration.
Since the option to turn them off was not there, I was just looking for a way to disable these features. I stumbled upon this cool solution.
How to turn off Post Revisions or Post auto save in wordpress 2.6?
To turn off Post Revisions in wordpress 2.6, add the following to your wp-config.php file:
How to change the timing (in seconds) WordPress auto saves a post
Add this following code to wp-config.php to define post autosave as 60 seconds.This configuration will tell wordpress 2.6 to auto save a post only once in 60 seconds.If you want to specify an even higher time interval, just increase this configuration (in seconds) accordingly.
How to delete existing post revisions and post autosaves?
If you have already made several posts after upgrading to wordpress 2.6, then delete the post revisions by executing the following query.But before executing any update or delete queries, it is a good idea to backup your database.
DELETE FROM wp_posts WHERE post_type = “revision”;
Now go ahead and disable/turn off post revisions and increase post autosave interval in wordpress 2.6.