By Editorial Staff in Featured, WordPress Tags: Code, Code Snippet, Snippet, WordPress, WordPress Snippet, WordPress Snippets
The following snippet will let you limit number of post revisions in WordPress.
| function limit_post_revisions(){ //limit the number of posts revisions that WordPress stores define( 'WP_POST_REVISIONS', 3); define( 'AUTOSAVE_INTERVAL', 180 ); } add_action('init', 'limit_post_revisions'); |