If you have run a WordPress blog for any length of time, you should know how large the SQL database can get.
This is largely due to the “Post Revisions”, which get auto-saved.
If you edit a post a few times, a huge list of revisions gets saved to the database. You can see these at the bottom of the post editing page.
This post has easy methods to disable and delete the post revisions, which are automatically cached by WordPress.
If you don’t use or need the post revisions which Worpdress has already saved for you, then you can delete them all by using the SQL query below:
DELETE FROM wp_posts WHERE post_type='revision';
You can also disable it from executing to start with by opening wp-config.php in your blog’s home directory.
Add these lines under “define(‘DB_COLLATE’, ”);”
define ('WP_POST_REVISIONS', 0); define('AUTOSAVE_INTERVAL', 600);
There is also a great WordPress Plug-in called WP-CMS Post Control, which gives you more control over how posts are edited.
This great WordPress plugin will allow you to:
I prefer to use the manual method, as too many plug-ins for WordPress can cause problems.
I don’t know anyone that has found the post revisions that WordPress saves, usefull.
Maybe in a future edition (v2.7 hopefully), they will include an option to disable from the admin control panel. But untill then thousands of blog owners will have to do it manually or use a plugin!

Categories
Tag Cloud
Blog RSS
Comments RSS

Void « Default
Life
Earth
Wind
Water
Fire
Light 
Great post. Thanks for sharing!
[...] I've probably seen it at least a dozen times. Just now when I was searching for it I found it here. But because I need to have the code handy here's the [...]
Should this speed up wordpress at the same time? I’ve got WP running on one site and it takes almost 2 seconds to generate the page (debug says that’s down to PHP, not MySQL though?)
@TechForum:
It won’t hurt. The main reason WordPress is slow, is due to the way it caches files.
A WordPress plugin like WP Super Cache should help bring the PHP page generation time down a lot
is this same as like
whats the difference?
And
Are the same, but the top version will also disable the Autosave feature too.
I found the Autosave to be more annoying than useful. I tend to edit posts many times to get the required page layout, so I did not to use it very much.
[...] Disable Post Revisions [...]