Stop WordPress Eating your Disk Space
Stop WordPress Eating your Disk Space

WordPress saves a "revision" of a post or page each time you save a draft or publish a post or page. The aim of this function was to enable an undelete type facility. Unfortunately this facility can eat a huge amount of disk space. This blog describes methods for disabling this feature.
Method 1: Manual
To disable WordPress revisions completely edit the wp-config.php file found in your wordpress root directory to include the following lines between the opening <?php and closing ?> tags:
/* DISABLE POST REVISIONS */
define('WP_POST_REVISIONS', false);
To delete the current revisions from your MySQL database, backup your database, then run the following SQL query from within PhpMyAdmin:
DELETE FROM wp_posts WHERE post_type = "revision";
Method 2: Plugins
Revision Control is a plugin for WordPress 2.6+ which gives the user more control over the Post/Page Revisions. The plugin allows the user to set a blog-global setting (Settings -> Revisions) for pages/posts to enable/disable/limit the number of revisions which are saved for the page/post. The user may change this setting on a per-page/post basis from the Revisions Meta box. The plugin also allows the deletion of specific revisions via the Revisions post meta box.
Conclusion
This should save a few Meg of disk space, it did for me. Enjoy and keep smiling…




