Deleted Post Revisions on WordPress and Meta Associated


Sponsored Links




WordPress introduces some new featured that called Post Revisions, if we keep on edit our post content, Post Revision will be created, and this is not good if you have a lot of Post Revision it’s will increased your Databases sizes, on this post I will show you how to deleted post revision and meta associated to those revisions on WordPress. So you can save your Databases sized.

how to deleted post revisions and meta associated

How To deleted post revisions and meta associated

The good things is, we will use SQL Queries to do this, you can use phpMyAdmin or install SQL Executionner Plugin and write down on your SQL Command Area

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);

And done, you have deleted post revision and meta associated to those revision. Thanks for share this code

Subscribe to Full RSS Feed

RSS FeedIf you thing this article useful, please consider subscribing to our RSS Feed or e-mail updates and stay updated with us. You can also follow @WPTricksNet on twitter for latest updates.

About WP Tricks

We are WordPress Family, we collected and writed useful tips and tricks for you WordPress. We share it for you...

Related Tips and Trick from Local Data and on The Net


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>