Snippet: Set maximum number of post revisions to avoid DB overhead

Revisions are stored as separate posts, the more revisions the more space they will take inside database. To avoid this database overhead there is a constant inside config file for maximum revisions.

Add following code to “wp-config.php”

Snippet

//It will configure to save the last 15 revisions.
if (!defined('WP_POST_REVISIONS')) define('WP_POST_REVISIONS', 15);

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>