Skip to content

Instantly share code, notes, and snippets.

@whalesingswee
Created February 18, 2019 02:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whalesingswee/c45bf9654917924a8db664aca2107d3c to your computer and use it in GitHub Desktop.
Save whalesingswee/c45bf9654917924a8db664aca2107d3c to your computer and use it in GitHub Desktop.
Limit the number of posts revisions that WordPress stores in the database
//The limit can be set in wp-config.php:
define('WP_POST_REVISIONS', 3);
//WP_POST_REVISIONS:
// true (default), -1: store every revision
// false, 0: do not store any revisions (except the one autosave per post)
// (int) > 0: store that many revisions (+1 autosave) per post. Old revisions are automatically deleted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment