How to Manually Disable Post Revisions in WordPress

>How to Manually Disable Post Revisions in WordPress
  • revision

Every time you make changes to a post or page, then save it as draft or update it, a WordPress revision – which is basically a full copy of the post or page – will be stored inside the database.

So, if you save a post as draft, like, 20 times, then you’ll have 20 WordPress revisions (copies) stored into your database, which leads to bloat – unnecessarily occupying space.

Now, if you want to completely disable the WordPress post revisions, not just limit the number of saves or manually remove them all the time, I’ll show you how to do it, without using a plugin!

How to disable WordPress post revisions

In order to disable the WordPress post revisions, you’ll need to edit your wp-config.php file, so you’ll need to know how to access and edit your WordPress files.

The wp-config.php file is found in the WordPress root directory, usually in the /public_html/ folder.

edit wp-config.php cpanel

Editing the file via cPanel

If you have more than one website on your hosting account, and you want to access one of your add-on domain’s WordPress files, then you should look in /public_html/YOURDOMAIN.COM/.

Once you’ve accessed the wp-config.php file, add the below code, right above the /* That’s all, stop editing! Happy blogging. */ line:

define('WP_POST_REVISIONS', false );

disable wordpress revisions code

Save the file and that’s it! The WordPress post revisions should be disabled now.

affiliate-disclosure-banner

How to delete the existing WordPress post revisions

Disabling the WordPress post revisions in your wp-config.php file won’t delete the existing ones that are stored in your database.

In order to delete existing revisions, use Companion Revision Manager – Revision Control, before or after you disable the revisions. Then you can just remove the plugin.

If you happen to use the WP Rocket caching plugin, like we do, then you’ll be happy to know that it has its own feature to delete WordPress revisions!

I recommend backing up your database or the entire website before deleting any revisions!

If you don’t have a backup plugin, I recommend Updraft Plus.

That’s a wrap

Hope you liked the post and found it comprehensive!

If you have any questions or thoughts, drop a comment, contact us or message us on Facebook.

You can also follow us on Twitter and subscribe to our YouTube channel.

If you want to start your own WordPress blog, or need a website for your business, our WordPress installation service is at your disposal!

You can also purchase a ready-made WordPress website with hosting and support included!

By |2018-08-31T01:45:40+00:00May 6th, 2018|Customization, WordPress|1 Comment

One Comment

  1. Selvio August 2, 2018 at 2:55 AM - Reply

    define(‘WP_POST_REVISIONS’, ….

    won’t work for many, no one know why, maybe it’s a bug

Leave A Comment