Limit WordPress Revisions

This little method right here is something I employ on all my WordPress websites. There are plug-ins that can do this for you, but it is such a simple code edit that there’s no real reason to have an extra plug-in for it.

If you want to see how many revisions you have for your posts/pages, go to the editor for one post/page. If revisions are not displayed under the text editor, then select the appropriate check box from the “Screen Options” drop-down in the upper-right of the WordPress Dashboard.

By default there is no limit on the amount of revisions so any limit you impose is going to help keep your WordPress database more efficient. We’ll be using the WP_POST_REVISIONS setting in our wp-config.php file to accomplish this.

In this example we’re going to set our max amount of revisions per page or post to 3. So in total there will be 4 entries in the database per page or post, 1 for the original itself, and then the 3 latest revisions.

Step 1. Login to your cPanel.
Step 2. Access the cPanel File Manager Code Editor and navigate to your wp-config.php file.
Step 3. Enter in the following code towards the top of the wp-config.php file:

/*
 @package WordPress
 */

define('WP_POST_REVISIONS', 3);

After that click on Save Changes at the top-right.

I use FTP to get, edit, and put the wp-config.php file. Use whatever works for you. That block of code is the important bit.

Excerpts from: Limit or disable WordPress revisions – InMotion Hosting