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

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 enable automatic updating for major versions in WordPress?

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

Prevent unauthorized WordPress wp-admin and wp-login.php attempts

 01.  Login in to cPanel  02. Click Directory Privacy  03. Click the folder icon next to...

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

How do I get Google Maps into my WordPress site?

If you need to display address information anywhere on a WordPress site, like if you have a brick...