Looking to Build/Redesign a Website or Blog ?

To speak to Rakshit, call +91 968 704 2303

How to Delete revision Post in WordPress

Hello Friends,

WordPress has post revisions concept which saves your post data at regular interval. Means if your browser crash or in any unexpected circumstance you might loose your written post. By this Post Revision, WordPress saves your post content after some amount of time. So there are many Post Revisions saves in Database which is useless once your Post is published. Also it increases the database load and as a result load time of your page increase. So here is how to delete post revisions in WordPress.

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’

Above MySQL query will remove all revision post from your database. Let me know if you find any problem.


1 Comment

Leave a Reply

Your email address will not be published.