diTii.com Digital News Hub

Sign up with your email address to be the first to know about latest news and more.

I agree to have my personal information transfered to MailChimp (more information)


Post Revision and AutoSave fix for WordPress 2.6

The new post revision and autosave functions in WordPress 2.6 needs a lot of database performance. Revisions: If you save posts in WordPress editor, a new row will be created in wp_posts table. Hence if WordPress auto saved 10 times, you will have 10 new rows in wp_posts table. This feature is useful, when a blog is maintained by different editors, because they can track the various versions/revisions of every post, but quite a resource wasting for all single editors blogs.
AutoSave now create a second copy of the post that is stored and used to keep the post up-to-date when a subsequent AutoSave is executed on the same one.

With the above two features running, in no time your wp_posts table will be filled up and the post ID will be huge. To turn off this feature, you can add the following code to wp-config.php 

define('WP_POST_REVISIONS', false);

You can also delete all exisiting post revisions by running the following query in phpMyAdmin. Note: Make sure to backup your database first before performing any queries in phpMyAdmin.

DELETE FROM wp_posts WHERE post_type = 'revision';

MG AdvancedOptions WordPress Plugin: Alternately, you can use, this plugin, that let you mange post revision system within WordPress admin panel.

Share This Story, Choose Your Platform!

Do NOT follow this link or you will be banned from the site!