Several versions back, WordPress came up with a great new feature most of us don’t need: Post Revisions. Post Revisions saves a copy of the post every time you update the post. Unfortunately, there is no setting in WordPress to turn off this feature and it can lead to a very bloated database. Luckily, if you don’t mind editing your wp-config.php file, you can easily turn this feature off or limit the number of revisions WordPress saves.
- Using a text or html editor, open your wp-config.php file located in the folder containing your WordPress installation.IMPORTANT: Make a backup copy of the wp-config.php file before you start; that way, you can restore the original file if your edit causes a problem.You can also use your cPanel File Manager to edit the wp-config.php file.
- Just before the line /* That’s all, stop editing! Happy blogging. */, paste the following code:
define( 'WP_POST_REVISIONS', false);
- If you want to keep x number of revisions, use the following code where 3 is the number of revisions you want to keep:
define('WP_POST_REVISIONS', 3);
- Save wp-config.php and wordpress will use your revision modification.
- If you’d like to delete all of the old revisions in the database and turn off revisions, you can install the WordPress Revision Control plugin instead of editing the wp-config.php file.