How to delete WordPress revisions: 2 Minute solution

Learning how to delete WordPress revisions can speed up your database (and, in turn, speed up your site) – and thanks to tools like WP Sweep and other WordPress revisions plug-ins and add-on options, the process is almost effortless!

Below we run through everything you need to know about WordPress revisions, how to remove them effectively with plug-ins and add-ons, and even how to clean up WordPress manually if you want to dive in and “get your hands dirty”.

Let’s get right into it, shall we?

What are WordPress Revisions?

A main component of the WordPress platform, revisions are essentially duplicate versions of your WordPress posts that are instantly created every time an edit is made.

Designed specifically to allow you to revert back to any previous version of a post without much headache or hassle, having these automatically saved copies around can be a real lifesaver at times.

Number of saved revisions
You can see the number of saved revisions for your current article on the right sidebar of the editor

On the other hand, though, it doesn’t take very many WordPress revisions on your site to start overloading your database, slow down your system, and turn your previously lightning-fast site into a slug.

Why You Should Delete WordPress Revisions

To keep your site running smooth, to keep it loading quickly, and to avoid stressing out your server and overtaxing your hosting resources it’s a good idea to delete really old WordPress revisions that you likely aren’t going to flip back to anytime soon – if ever.

You’ll see immediate benefits to the speed of your pages, should enjoy improved stability, and will still have a handful of revisions (recent revisions) you can flip back to if you really need to restore your page to a previous iteration.

How to Delete WordPress Revisions with Plugins

While the manual process for getting rid of WordPress revisions is generally pretty simple and straightforward, you can fully automate this task – and have it work across your database and across all posts – with a couple of useful plug-ins like WP Sweep and WP Rocket.

Below we run through exactly how to use these plug-ins to optimize your site, effectively clean out ancient WordPress revisions, and free up some critical resources. All without you having to handle any of the heavy liftings on your own!

It doesn’t get much better than that, does it?

Let’s jump right in.

1. With WP Sweep

The first thing you’ll need to do is (obviously) install the WP Sweep plugin into your WordPress installation.

100% free, this tool is designed to target revisions specifically – giving you an (almost) effortless method for cleaning up your database, cleaning out old revisions, and keeping your site neat and organized behind the scenes.

Delete WordPress revisions with WP Sweep plugin

Here’s the process for rocking and rolling with WP Sweep:

  • Sign into your WP Admin backend
  • Navigate to the PLUGINS menu
  • Click ADD NEW and search for WP Sweep
  • Run through the on-screen installation and activation process

After that has been taken care of you’ll want to jump into the WP Sweep tools (found under the TOOLS menu in your WP-Admin backend) to get rid of unnecessary and unneeded revisions.

After opening up this tool you’ll have the ability to sweep out revisions, automatic drafts, deleted posts, metadata that has been orphaned and duplicated, and a couple of other database items that will free up space, unlock resources, and speed your WP platform up significantly.

You can either sweep each category individually or dive deeper into the DETAILS of each group, determining what needs to be swept away and what can be left behind.

The freedom and flexibility (not to mention the effectiveness) of WP Sweep helps to make it a “must-have” add-on for those serious about keeping their WordPress installation light and fast.

2. With WP Rocket

Another great tool for automatically eliminating post revisions from your WP database after they have been created, WP Rocket is very simple and straightforward to use.

Deleting WordPress revisions with WP Rocket

You will have to purchase WP Rocket to take advantage of this plug-in (compared to the free WP Sweep tool mentioned above), but the cool thing here is there are a lot of other settings and a lot of other features designed to optimize your WP installation, too.

It’s not hard to improve loading times, security, and stability significantly with WP Rocket.

After purchasing a license, however, and installing the tool into your WP Admin Backend you’ll want to navigate to the plug-in TOOLS section as well.

From there jump into the POST CLEANUP section of the site, check the REVISIONS button to eliminate any post revisions automatically, and then you are off to the races again.

You’ll also be able to sweep away Auto Drafts and Trashed Posts under the POST CLEANUP section of this plug-in.

How to Delete Revisions Manually

The easiest way to delete revisions manually is to dive headfirst into the SQL database your WordPress installation is running off of (usually through the PHPMyAdmin tools provided with your hosting account) and delete those entries away individually.

Obviously, this method is really only recommended if you are comfortable navigating the database environment of your WordPress installation.

A wrong move in your backend can throw your site into a tailspin – and can lead to some pretty long nights (and maybe some expensive tech support) trying to get things back up and running again.

At the same time, though, nifty little plug-ins (like the Simple Revisions Delete plug-in) have been optimized for the PHPMyAdmin environment to streamline the process a little bit. That’s not a bad approach to take, especially since it’s available totally free of charge, too.

How to Disable WordPress AutoSave

Of course, all of the tips and tricks highlighted above are only going to help you eliminate post revisions after they have already been created (which means they are already cluttering up your database).

If you want to prevent these revisions from being created in the first place you’ll need to disable the WordPress AutoSave feature.

This can be done with a plug-in, like the Disable Gutenberg AutoSave plug-in (available free of charge). Or you can dive into the functions.php file of your WordPress installation and disable AutoSave there by adding specific code into the THEME FUNCTIONS section of this file.

The code you’ll want to add looks like this:

add_action( ‘admin_init’, ‘disable_autosave’ );
function disable_autosave() {
wp_deregister_script( ‘autosave’ );
}

Finally, you can also disable AutoSave by editing the wp-config.php file with a simple string of code, too.

You’ll have to log into your administrative cPanel of your hosting service, navigate to the wp-config.php for your WordPress site, and then add the following string of code at the very top of the file:

define('AUTOSAVE_INTERVAL', 86400)

Click SAVE CHANGES and now you’re good to go!

You’ll never have to worry about WordPress creating post revisions that slow your site down ever again!

Leave a Comment