Post revisions is a feature in WordPress that seems like a good idea but when left unrestrained becomes a bit superfluous and bloats the database. At most one would probably only want 1-3 revisions saved of a post. I found numerous sites detailing how to modify/disable this but most of them leave out critical information for it to actually work.
Basically you add the following code to your wp_config.php file:
define('WP_POST_REVISIONS',false);
or
define('WP_POST_REVISIONS',1);
for limiting it to 3 revisions per post.
But the missing bit of information that renders this useless is that you can’t put this code at the end of your wp_config.php file, which seemed the most logical to me. Instead it must be directly below the 'DB_COLLATE' line:
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');
/* Turns off the post revision system */
define('WP_POST_REVISIONS',1);
so that the line is before:
/** WordPress absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
This then worked for me across all my sites. It also meant that a post that had more than the new amount of revisions would have them reduced after editing and saving. It is possible to remove existing post revisions by running a mySQL query.




