• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
WPFeed

WPFeed

  • News
  • Tutorials
    • WordPress Multisite
    • BuddyPress
    • Design
  • Reviews
    • Plugins
  • Roundups
  • Snippets
  • Giveaways
Home » How To » Speed Up Site by Deleting WordPress Post Revisions

Speed Up Site by Deleting WordPress Post Revisions

Post revision was introduced in WordPress 2.6. Whenever you edit your post or page, a revision is automatically created.  Therefore, this is really useful if you want to see changes you’ve made to the article.

Here’s a log of post revisions for one of my articles at WPFeed.com:

wordpress-post-revision

However, the problem with post revisions is WordPress does not limit the number of post revision can be stored for each post and page. Let’s do some quick math. Let’s say you have 100 articles and for each article, you made an average of 5 changes per article. That means you already have 500 post revisions stored in your database. That’s a lot.

Therefore, for a long-term, this additional post revisions will slowly increase the size of your database and eventually slow down your site. This is bad.

Deleting Post Revisions

The easiest way to delete ALL post revisions is by using WP-Sweep
 plugin. Once activated, go to Tools > Sweep. If you never delete your post revisions before, you will see probably hundreds or thousands of post revisions. It will also provide a lot of other options to optimize your database. Check the image below.

post-revisions

As you can see, I’ve got almost 1000 post revisions! To delete them, I just simply need to hit the blue button.

Disabling Post Revisions

It’s also possible to disable the post revisions feature. However, I do not recommend disabling it since sometimes you might want to to do a comparison of changes you’ve made.

To disable the post revisions feature, paste the following code in your wp-config.php file:

define('WP_POST_REVISIONS', false );

Limiting Post Revisions

Another thing you might want to try is by limiting the number of post revision. Paste the following code in wp-config.php file, where 3 is the number of revisions allowed.

define('WP_POST_REVISIONS', 3);

However, if you are unsure where to find your wp-config.php, you can also use Revision Control plugin. From the plugin settings page, you can set the number of revisions for post and pages or completely disable it. The plugin can also delete post revisions from other posts. However, I found it no to be very practical as you cannot delete them in bulk, instead, you need to delete them one article per time.

Reader Interactions

Leave a Reply Cancel reply

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

Primary Sidebar

Partnerships

For WP Deals and Discounts, visit WPCouponCode.com

Recent Posts

  • WordPress is a brilliant platform that is loaded with tons of stuff for websites.
  • How to Sync Stock & Price for WooCommerce Products
  • How to migrate a WooCommerce Store to a new site
  • How to Import WooCommerce Products
  • How to export WooCommerce Orders

Copyright © 2022 · WPFeed.com - A Project of TechAbout LLC.

  • About us
  • Advertise
  • Write for us
  • Terms and Conditions
  • Privacy Policy
  • Contact us