• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

WP Thinker

The WordPress Playground

  • Snippets
  • Best
  • Guides
  • Reviews
Home / Wordpress

October 22, 2018 Muhammed Swalih

How to Disable Post Revisions in WordPress to Reduce Database Size

how-to-disable-post-revisions-in-wordpress-to-reduce-database-size

Post revisions is a great feature which shows the automatically saved or manually saved post revisions. You could revert any changes made in anytime if the post revisions are available. This is a great feature for many of the WordPress users. But, someone may find that, as a bad thing. If you have a limited amount of database storage or you no longer need the autosave feature, this article on ‘how to disable post revisions in WordPress to reduce database size’ might help you.

How to Disable Post Revisions in WordPress to Reduce Database Size

To disable post revisions in WordPress to reduce database size, follow the steps given below.

  1. Login to your web disk (Hosting account)
  2. Go to the WordPress Root directory.
  3. Open  wp-config.php located in the WordPress root directory.
  4. Add the following code to the file and save the changes.

define('AUTOSAVE_INTERVAL', 300 ); // seconds
define('WP_POST_REVISIONS', false );

This will change the default 1-minute autosave to the 5-minute autosave. This helps you reduce the database consumption to a great extent. If you realize that you don’t need the past revisions of your WordPress posts, you can open the PHPMyAdmin and run the following SQL query.

DELETE FROM wp_posts WHERE post_type = "revision";

This will clear all previously saved post revisions stored in your database.

This tutorial is only for educational purpose. We do not recommend deleting the post revisions or disabling it. It is a good feature of the WordPress which help you stay updated without your content. Even if you had forgotten to save the changes, the WordPress will automatically do it for you. So, do it in your own risk.

Muhammed Swalih

A WordPress expert who has been tweaking WordPress functions, plugins, themes and almost everything related to WordPress for the past 5+ years.

Primary Sidebar

Related Articles

Footer

WP Thinker is a website that publishes everything related to WordPress, Plugins, Themes, SEO, Blogging, etc.

  • Facebook
  • Twitter
  • Pinterest

Copyright © 2022 · WP Thinker

  • About Us
  • Advertise
  • Write for Us
  • Privacy Policy
  • Terms and Conditions
  • Contact Us
This website uses cookies to serve you better. By continuing to use this website, you agree to our cookie and Privacy Policy.