Limit WordPress Revisions In wp-config – Revision Control Speeds Up Database | WP Learning Lab

Grab Your Free 17-Point WordPress Pre-Launch PDF Checklist: http://vid.io/xqRL
Download our exclusive 10-Point WP Hardening Checklist: http://bit.ly/10point-wordpress-hardening-checklist
Limit WordPress Revsions In wp-config – Revision Control Speeds Up Database | WP Learning Lab

define( ‘WP_POST_REVISIONS’, X );

In this tutorial you will learn about the WordPress revision control system (also known as WordPress version control). This system keeps WordPress page revisions and WordPress post revisions incase you want to revert back to them in the future.

The way it works is every time you make a change to a WordPress page or post and save it WordPress creates a new revision in the database. If you create a lot of revisions for a lot of pages and posts, keeping those extra revisions can consume A LOT of database space and resources. This can slow down your site substantially.

So I recommend that you use a WordPress revisions plugin to WordPress limit revisions. Or add the following code right to your wp-config.php file:

define( ‘WP_POST_REVISIONS’, X );

All you have to do is paste that into wp-config.php above where it says “Stop Editing, Happy Blogging!”. Replace the X with the number of revisions you want to keep, usually 3 is a good number. Then save the wp-config.php file.

All of the revisions will still be there for each post, but the next time you save the post, all but the most recent 3 revisions will be removed.

By putting that code into the wp-config.php file you can avoid using a revision control plugin or a post revisions plugin.

I highly recommend you limit the number of post revisions to keep your database optimized. With this method you don’t WordPress edit revisions, you simply eliminate revisions.

I hope this information helps you! If you have any questions leave a comment below or ping me @WPLearningLab on Twitter.

————–

If you want more excellent WordPress information check out our website where we post WordPress tutorials daily.

Home

Connect with us:

WP Learning Lab Channel: http://www.youtube.com/subscription_center?add_user=wplearninglab

Facebook: https://www.facebook.com/wplearninglab

Twitter: https://twitter.com/WPLearningLab

Google Plus: http://google.com/+Wplearninglab

Pinterest: http://www.pinterest.com/wplearninglab/

4 comments

  1. JoeAnim IDN. on

    Can you help me please? I’m not the web dev but I’m a web surfer. at the first time I visited the web and it works fine and then a few times I visited the page says 508 Resource limit is reached. Why it’s happening I’m only a web surfer.

    Reply
  2. Brittany Quinn on

    wp learning lab im curious in the cpanel what is php process. its found in cpanel menu is it normal if a website is running 3?

    Reply
  3. Mel Wiens on

    This is the best video on how to do this. I like how you tell where to find the folder, where to put the code, and what exactly to enter. Thank you.

    Reply

Leave a Reply

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

Show Buttons
Hide Buttons