Deleting post revisions from the WordPress database

One of the great features the WordPress added in was post revisions. Any changes made to posts are automatically saved into the database so you can roll back if you need. The one drawback of this setup is your database can become full of revisions you'll never use.

WordPress auto saves every few minutes, so if it takes you a while to put together a post you can end up with dozens of extra entries in your database. This can add up to a bigger database, and slower loading times. Fortunately, there is an easy way to fix this.

Start by logging in to cPanel and clicking on the phpMyAdmin link.




Go to your WordPress database and click the SQL tab.




Then you just need to enter the following query:

DELETE FROM wp_posts WHERE post_type = "revision";


Now your database is nice and clean.

  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

Displaying the most recent posts from a single category in WordPress

Have you ever seen a site that showed the most recent post or posts from a single category? If...

How do I have WordPress update plugins and themes automatically?

WordPress will automatically apply minor release updates to your site, so you can be sure...

How to change the admin color scheme in WordPress 3.8

We're big fans of the new admin layout in WordPress 3.8. One complaint we've seen going around...

How do I enable automatic updating for major versions in WordPress?

WordPress has added in support for automated upgrading of minor releases. This means it will...