Deleting WordPress Revisions Will Save Space and Increase Performance

If you are a WordPress user, you will be very familiar with the internal system that saves revisions of your posts during the drafting process:


This has come in very handy….never.  It’s never come in handy, ever.  I’m sure one day it will save the day and I will regret this, but for now it is just annoying.

Not only that, they take up valuable database site, and can even lead to a slower site speed and poor performance.

What shall we do?  Download a plugin?

Not even close. Although there are some database plugin optimzation plugins, today we are going to jump under the hood of WordPress, and run an SQL database query.

Sounds hard, huh?

Well it isn’t.  It’s actually really easy, pretty much anyone who can click on a few icons and paste some code can do it.

Ok, how do I do this?

Start by going to your hosting control panel, most likely cpanel.

Locate the “phpmyadmin” module.  This module is for the sole purpose of managing sql databases.

Next, find the database that you want to optimize by clicking on it on the right hand side.  Once you’ve located the database, go to “SQL” at the top.

(note, always backup your database before performing any SQL database maintenance. )

You will now be presented with  a text-area box where you can type.  Paste this code:

DELETE FROM wp_posts WHERE post_type = “revision”;

and hit GO!

If you are successful, you’ll see something that looks like this:

delete wordpress revisions

This process should have taken you about 2 minutes but will leave you feeling fresh and clean.  Don’t you feel better that 5000 rows have been deleted from your database.

Your website thanks you.

Patrick Coombe
Hello I'm Patrick Coombe and I'm the CEO and Founder of Elite Strategies, an agency I started in 2009. One of the main reasons I love blogging about SEO is the research it takes to come up with the posts. It allows me to not only write about what I love, but to learn more about the industry in the process. I hope you enjoyed this post, if you did consider sharing it or even better linking to it!
Blog Web Development WordPress

Leave a Reply

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

Contact Info

2240 Woolbright Road Suite 404
Boynton Beach, FL 33426

Phone: 561-526-8457
Fax: 561-526-8707