How to Optimize WordPress Revisions for Faster Performance?

WordPress Revisions could be slowing down your site and affecting performance, learn how to optimize WordPress Revisions to avoid this.

How to Optimize WordPress Revisions for Faster Performance?

WordPress is one of the best CMS platforms that offer its users a ton of exciting features. One such feature is the in-built ‘Auto-saving’ function that creates a revision whenever you save a page/post. This feature is helpful as it allows you to go back in time to the previous versions of your page/post and make necessary changes.

 

However, the downside of this feature is that WordPress automatically saves a temporary revision, whether you are working on a draft or an already published post, every 60 seconds. This can add up to a lot of post/page revisions, which could hurt your site’s speed and performance as all these revisions are stored in your database, eating up your storage space and making your site slow.

 

How Does WordPress Revisions Impact Your Site’s Performance?

 

More often than not, older websites have many page/post revision entries in their database, which could be the reason why their website has become sluggish. 

 

For instance, let’s say that you have 200 pages or posts with 100 revisions of each. This means that you have 20,000 entries in the database, which is huge, to say at the least. 

 

For this reason, you must optimize WordPress Revisions. Thus, in this post, we’ll look at how to delete, limit, and disable WordPress revisions, which could help you to enhance your site’s performance.

 

Different Ways To Optimize WordPress Revisions for Faster Performance

 

 

1. Delete WordPress Revisions With a Plugin

 

 

Being a user-friendly CMS platform, WordPress gives you an easy option to optimize your WordPress Revisions with the help of a plugin. Now, while there are several options available that you can choose from, we recommend using the WP-Sweep plugin

 

It is a free plugin that not only helps to clean up revisions and auto-drafts, but it also cleans up deleted comments, duplicated post/comment/user meta, orphaned post/comment/user meta as well as helps optimize database tables. With 100,000+ active installations, this is one of the popular WordPress plugins that can help to clean up the junk from your database, thereby improving the performance of your WordPress website.

 

To get started;

 

  • Step 1 – Go to your WordPress dashboard, click on ‘Add New’ plugins and search for the WP-Sweep plugin. Click on ‘Install Now’ followed by ‘Activate.’ 

wordpress revisions plugin

  • Step 2 – Now go to Tools>>Sweep. You will see revisions and the count along with other options to optimize your database. Click on ‘Details’ to see which posts/pages will be impacted.

 

NOTE: You’ll also see a warning message on the top; before you do any Sweep, please backup your database as the sweep process is irreversible.

step2

Image Source: https://kinsta.com/knowledgebase/wordpress-revisions/ 

 

  • Step 3 – The plugin provides detail on the revisions you have made and the percentage of optimization. Once you’re ready, click on the action button “Sweep” next to Revisions.

step3

Image Source: https://kinsta.com/knowledgebase/wordpress-revisions/ 

 

You will then see a confirmation message along with the information on the total number of revisions removed. 

step3b

Image Source: https://kinsta.com/knowledgebase/wordpress-revisions/ 

 

 

2. Delete WordPress Revisions With WP-CLI

 

 

This is an advanced option to delete WordPress revisions, so typically it would need the aid of a WordPress developer. 

 

Here is an example of a WP-CLI command:

WP-CLI command

For more information, you can read this complete documentation of WP post delete WP-CLI commands.

 

 

3. Limit WordPress Revisions With a Plugin

 

 

  • Step 1 – Go to your WordPress dashboard, click on ‘Add New’ plugins and search for the WP Revisions Control plugin. Click on ‘Install Now’ followed by ‘Activate.’ 

Limit WordPress Revisions With a Plugin

  • Step 2 – Once activated, go to Settings»Writing. Now, scroll down to the WP Revisions Control section.

wp revisions control

Image Source: https://www.wpbeginner.com/beginners-guide/complete-guide-to-wordpress-post-revisions/ 

 

Now all you have to do is set the number of revisions for each post type and click on ‘Save Changes.’ This will limit the WordPress revisions stored in your database.

 

What’s more, with this plugin, you can also delete revisions for a single post. Just edit the post/page you want to delete revisions for and click on the ‘Purge these revisions’ button.

purge

Image Source: https://wordpress.org/plugins/wp-revisions-control/ 

 

 

4. Limit WordPress Revisions Manually

 

 

You can also limit WordPress Revisions manually by adding a code to your WordPress site’s wp-config.php file. You can access this file via FTP, as the file is located in the root of your WordPress site directory.

wp config file

You can replace the number ‘10’ with the number of revisions you want to store in your database per page/post.

 

Image Source: https://www.wpbeginner.com/beginners-guide/complete-guide-to-wordpress-post-revisions/ 

 

 

5. Disable WordPress Revisions

 

 

While we don’t recommend this option, some may prefer to disable WordPress Revisions altogether, especially a single author site. So, to completely disable revisions in WordPress, you can do the following;

 

Open your wp-config.php file. Follow the same steps as point 4 (Limit WordPress Revisions) and add the following code;

Disable WordPress Revisions

This will disable the WordPress revisions feature on your website. However, WordPress will still save one auto-save and one revision in your storage. 

 

Alternatively, you can also disable WordPress Revisions with the help of the Disable Post Revision plugin.

 

Just install the plugin from your WordPress dashboard and upon activation, go to Settings»Writing and select the post types for which you want to disable the revisions feature.

settings

Image Source: https://www.wpbeginner.com/beginners-guide/complete-guide-to-wordpress-post-revisions/

 

Conclusion

 

A faster website not only helps reduce bounce rate but can also help boost your site’s ranking on the search result. Optimizing your database is one of the most important WordPress website maintenance tasks. As such, don’t forget to delete and limit your WordPress Revisions, which will help optimize your database and improve your website’s performance.

If you’re looking for advice on selecting the best SEO friendly theme for WordPress, click here, and don’t forget these 4 SEO optimization tips for WordPress that way too easy not to do.

 

Was this post helpful? Let us know in the comment below!