diTii.com - All About Techology : features Latest News and Informtion About Technology

Menu

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 […]

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.

Post navigation

Deepak Gupta is a IT & Web Consultant. He is the founder and CEO of diTii.com & DIT Technologies, where he's engaged in providing Technology Consultancy, Design and Development of Desktop, Web and Mobile applications using various tools and softwares. Sign-up for the Email for daily updates. Google+ Profile.