Limit the number of post revisions in WordPress

Limit the number of post revisions in WordPress

For each saved edit made to a post or a page, WordPress saves a revision in the database. This can really increase the size of your database when your working with a lot of posts or pages. WordPress has a built-in revisions option which you can set in the wp-config.php file. You can also disable revisions altogether.

To disable revisions completely: 

define( 'WP_POST_REVISIONS', false );

 To limit the amount of revisions:

define( 'WP_POST_REVISIONS', 3 );

You could also just download the Revisions plugin 

That way you can set the revisions number from the admin section.

 Revisions plugin WordPress

 

WordPress also saves an auto-save revision when editing a post or page. You can set the interval of this auto-save function. By default it saves a revision every 60 seconds. 

Set the auto-save interval:

define( 'AUTOSAVE_INTERVAL', 150 );

 

3 gedachten over “Limit the number of post revisions in WordPress

Geef een reactie op Jimako Reactie annuleren