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

How do I disable automatic updating in WordPress?

One of the many features added to WordPress in 3.7 was automatically updating for minor releases....

Use .htaccess to block WordPress brute force attacks

WordPress has been targeted recently for brute force attacks where hackers use automated scripts...

Use .htaccess to block WordPress brute force attacks

WordPress has been targeted recently for brute force attacks where hackers use automated scripts...

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...