How to Mass delete autosaved posts in WordPress

How to Mass delete autosaved posts or Post revisions in WordPress

The tutorial covers, How to Mass delete auto-saved posts or Post revisions in WordPress, how to delete the post revisions at one go using PHPMYADMIN and SQL query.

Step 1: Open your phpMyAdmin Control panel
Step 2: Click on the SQL tab to open the sql query text box
Step 3: Type the blow query made by Andrei Neculau

Note that if your WordPress DB Prefix is other than the default WP, Change that in the query. And execute the below query, you are Done !

DELETE a,b,c FROM wp_posts a LEFT JOIN wp_term_relationships b ON (a.ID=b.object_id) LEFT JOIN wp_postmeta c ON (a.ID=c.post_id) WHERE a.post_type=’revision’;

NOTE: This method will delete all revisions from every post including all of its meta data.


  1. anupal August 4, 2011
  2. Satya November 13, 2011
    • Joshu December 2, 2011
  3. Alex January 17, 2012