How do I delete post revisions from my database? Print

  • 12

Over the course of publishing several articles on your WordPress blog, your database will begin to accumulate a large amount of post revisions. This can eventually clog up and increase the size of your database. To delete all the post revisions saved to your database, kindly follow the steps below.

1) Log into phpMyAdmin and select your blog’s database.
2) Then, enter the following in SQL query
DELETE FROM wp_posts WHERE post_type = "revision";

This code will look for the wp_posts table and delete all posts with revisions saved to it. This will speed up the response rate of your database.

Was this answer helpful?

« Back