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:

rev

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.

Share This Story, Choose Your Platform!

About the Author: Patrick Coombe

With two decades of industry experience, Patrick Coombe is a seasoned technologist specializing in the evolution of the modern web. From SEO to cloud infrastructure and web programming to the latest in AI automation, Patrick’s work is defined by a relentless curiosity for how things work. Whether he is building web applications or advocating for his clients, his goal remains the same: simplifying complex technology into actionable growth for businesses and most of all: learning new things.

Related Posts

  • content cleanup
    SEO: Content Cruft Cleanup Case Study

    July 7, 2025

    If you've been paying attention to a lot of the case studies in various SEO blogs, you'll see more and more articles about content...

    Read More

  • Website Launch (Live) & Website Transfer Checklist

    November 19, 2019

    Here at Elite Strategies we are all about the 3 P's of consulting: people, process, and product. People, the people that make and...

    Read More

  • what is a knowledgebase
    5 of the Best Knowledgebases That Kill The SEO Game

    July 8, 2019

    If you want to know one of the hottest buzzword in SEO right now, it is "knowledgebase." Knowledgebases go by many different names, help...

    Read More

  • 8 Amazing SEO & Digital Marketing Tweet Chats

    May 6, 2019

    Twitter chat's are an excellent way to stay connected to the SEO community, learn more about SEO, as well as give back knowledge and...

    Read More