Posted By

chrisaiv on 09/13/14


Tagged

wordpress


Versions (?)

Wordpress: Limit # of Post Revisions


 / Published in: PHP
 

If you make a lot of edits, eventually the revisions will start to bother you or bog down your database. Heres how you can put a cap on the number of recorded revisions.

  1. function limit_post_revisions(){
  2. //limit the number of posts revisions that WordPress stores
  3. define( 'WP_POST_REVISIONS', 3);
  4.  
  5. define( 'AUTOSAVE_INTERVAL', 180 );
  6.  
  7. }
  8. add_action('init', 'limit_post_revisions');

Report this snippet  

You need to login to post a comment.