How to Delete Previous Post Revisions in WordPress Database
Posted on : 26-07-2009 | By : Redouane | In : WordPress
0
Further to my previous post regarding disabling Post Revisions in WordPress 2.6 or Later, this post will explain how to remove those posts that have been previously saved to your WordPress database.
Before running any SQL commands to changing anything, it’s critical that you backup your WordPress database and posts. A detailed guide on how to backup WordPress database is available from WordPress.org.
Now, deleting previous post revisions can be done easily from phpMyAdmin which is available with most web hosting providers from cPanel or other hosting control panel. Once you are on phpMyAdmin, select the database of your WordPress blog, if you have more than one, and run the following SQL statement:
DELETE FROM wp_posts WHERE post_type = “revision”;
The only draw back of removing previous revisions is that you won’t to go back to earlier version of posts. On the plus side, it will help reduce the size of WordPress database and process queries much faster (when blog pages are served to users).





