How to delete unused post revisions from your WordPress Database

How to delete unused post revisions from your WordPress Database

If you are looking for delete unused revision post from your WordPress database means sometimes you update WordPress posts a lots of time, which can lead to a long list of Post Revisions for your posts. In this tutorial we are showing you how to delete revision post from your database.

Step 1 : You should logged into your website’s hosting control panel, if you are not logged in then do so now.

Step 2 : Just open the phpMyAdmin from your Site Hosting Account, and run the following query on your WordPress database. This will delete all post revisions and the meta associated with them from your WordPress database. I strongly suggest making a backup of your WordPress database before running this query, which is always a good idea for any changes to your database.

MySql Query for delete revision post from your database

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

Now that these Post Revisions are gone, your WordPress posts should be a little less cluttered.

About Author

My name is Mukesh Jakhar and I am a Web Application Developer and Software Developer, currently living in Jaipur, India. I have a Master of Computer Application in Computer Science from JNU Jaipur University. I loves to write on technology and programming topics. Apart from this, I love to travel and enjoy the beauty of nature.

Sign up for weekly update

Milkshake is almost ready. If you're interested in testing it out, then sign up below to get exclusive access.