Delete all Post revision from WordPress Database at One Go

Earlier we talked about WordPress post revision feature and how you can disable post revision with plugin or disable post revision with little hack. Though we have achieved the target to disable the post revision feature but still most important thing that remains there is deleting all previous version of WordPress post revision. If you have hundred+ posts you can see lots of post revision on your blog and obviously your wordpress database size will be big. To delete previous post revision you can run this query in your sql database to delete all instance of previous auto saved blog posts.

DELETE FROM wp_posts WHERE post_type = "revision";

Make sure you take the database backup before running this query. This will ensure the safety of your wordpress database. Alternatively you can use wp-optimize wordpress plugin, if you are not familiar with running sql query.