Tip for WordPress Bloggers: Disable Revisions, Install WP-Optimize & Make Your Blog Faster!

The problem with WordPress Revisions

Every single time you hit the “Save Draft” button, a new copy of your post gets saved. Then you hit “Save Draft” again and ANOTHER copy gets saved. Those old copies never ever get deleted. So let’s say you have 500 posts and hit “draft” 5 times on each post before you publish it. That means you actually have over 3,000 posts saved in your database! Every post takes up more space and can slow things down.

Ask yourself: do you need revisions?

I never, ever use the revision feature. Maybe some people completely depend on it, but I don’t. I have never wanted to revert back to an earlier version of a post. It’s just not the way I write. Therefore, revisions are completely useless to me and they’re just taking up extra space!

However, if you do use revisions, it’s still worth installing WP-Optimize. Just skip the next section on disabling revisions!

Disable revisions

There is a small bit of code you can add to a WordPress file to disable post revisions. Connect to your site in an FTP client and open up the wp-config.php file. Look for the line that says:

/* That's all, stop editing! Happy blogging. */

And add this right above it:

// Disable post revisions
define('WP_POST_REVISIONS', false );

Then save and re-upload this back to your server. Ta-da! Now WordPress will no longer create post revisions.

But that’s not all. All those revisions we talked about still exist in your WordPress database. Let’s get rid of those!

Install WP-Optimize to clean up your database

WP-Optimize, WordPress Plugin

Install a plugin called WP-Optimize. This plugin will allow you to:

  • Delete all post revisions
  • Delete auto drafts
  • Purge spam/unapproved comments
  • Optimize your database tables

So install it and delete away! I deleted all my post revisions and I also optimized my database tables. I totally wish I took a screenshot beforehand, but I had THOUSANDS of post revisions! It was absolutely insane.

After deleting my revisions and optimizing my database, I noticed that my blog—especially the admin panel—was significantly faster!

Photo of Ashley
I'm a 30-something California girl living in England (I fell in love with a Brit!). My three great passions are: books, coding, and fitness. more »

Don't miss my next post!

Sign up to get my blog posts sent directly to your inbox (plus exclusive store discounts!).

You might like these

41 comments

  1. Oh, if only this was available for wordpress.com. I don’t even think I’ll never need it, and I want to get rid of it, but there’s no way how. And that takes up space? I just want to petition WordPress to allow us to opt out. That would be less work for them, right? Hosting all that would mean money.

    Anyway, thanks for pointing that out, Ashley! I’ll definitely think twice about hitting that button. Or maybe I just type up a draft with a lot of revisions, then delete the draft after I’ve copy/pasted everything. Hmmm . . .

    Shannelle (The Tracery of Ink) recently posted: The First Post: Writers Unite! Intro Post
    1. Well WordPress.com works very, very differently.

      For example, on self-hosted WordPress you have your own database. So if you delete all your revisions, you’re massively cleaning your database and that can make a huge difference. But on WordPress.com, hundreds or thousands of blogs all share the same database. So if ONE person were to delete all that one person’s revisions, it wouldn’t make a big difference since every other hundreds/thousands of people will still have all their revisions.

      But that being said, it’s entirely possible that WordPress.com does some routine maintenance and cleans out old revisions or something. I have no idea though.

      1. Whether it matters for loading time or not, I still wish there was a way to delete my old copies… it just bugs me seeing that I have 17 versions of the same post (and several of them are identical or nearly identical… auto-saves, fixing a typo, what have you…)

        Charleen recently posted: October Mini-Reviews
  2. Thank you!!! I’ve had concerns about the inefficiency of having so many unnecessary revisions, not to mention the spam. What a big sigh of relief to find out there’s a way around it! So glad I’m following this blog… 🙂

    1. You don’t have to update it after every WP update. The wp-config.php file doesn’t get touched during updates. 🙂

  3. Thanks for this, Ashley. I didn’t know that all post revisions will be saved. I presumed that whenever there’s a new update, it will just be appended to the latest copy. It didn’t occur to me that WP will make a lot of copies. That’s why my admin panel is taking so long to load. Argh.

    Okay. Just installed the plugin and I have 905 revisions. I don’t even need them >,<

    Thanks for this very helpful tip, Ashley!

    Charlotte recently posted: Book Review: Daughter of Smoke and Bone
  4. Thanks Ash! Just used this and it has definitely improved the speed in my admin panel! I found that was getting super slow in the last 3-4 weeks and it’s back to normal now! Yay! My site itself was already pretty fast (I improved a lot of widgets lately) but hey it can’t hurt that either! 🙂

  5. I see it gives an option to remove pingbacks and trackbacks. I have 300 trackbacks. Wondering if I should remove these as well ….which leads me to thinking I don’t really understand pingbacks and trackbacks. Are they good or bad? Think I read somewhere the majority of the time they’re spam.

    1. I like them. You can see some of mine below the comments. They notify you when someone links to your blog post. Akismet will catch any spammy ones. I find that most of mine are legit, and I rarely get any spam ones.

      Some people don’t care about them though, so ultimately it’s up to you.

    1. Transients are a way of storing data for a period of time. There’s no harm in removing them because transients can just be remade if they’re needed.

      And postmeta probably means that you have post meta data still there for posts that no longer exist. Like when you create a post, a section is stored in your blog about the post. Then a SEPARATE section is stored with information about that post, like associated tags/categories/custom fields.

      So orphaned post meta probably means that the original post no longer exists, but the extra information is still there.

      1. I didn’t see an option for orphaned post meta, does that mean I didn’t have any or was that option removed? When looking at the table data I have a LOT of post meta in relation to the number of posts.

        1. Either they removed that option or you don’t have any. I’m not sure. But it’s common to have a ton more post meta than posts. Think of it like this: each of my posts gets an average of 1 or 2 categories and anywhere from 3-10 tags. I have almost 2,000 tags alone, but under 1,000 posts. Categories and tags are just one small part of “post meta”.

  6. I’ve only been on WordPress for a month and already had several hundred revisions. I’m not completely comfortable playing around with the wp-config.php file just yet, but until I am will be making this a regular on the blogging to-do list. Thanks for the tip Ashley!

    1. Totally! The revisions can really add up. Especially if you’re smart and save your drafts often. 😉

Recent Posts

    Random Posts