wp revisions config

  1. Access your WordPress dashboard and navigate to the theme editor.

  2. Locate the functions.php file in your theme files.

  3. Add the following code to the functions.php file to limit the number of revisions stored:

// Limit post revisions
if (!defined('WP_POST_REVISIONS')) define('WP_POST_REVISIONS', 5);
  1. Save the changes to the functions.php file.

  2. This code limits the number of post revisions to 5, meaning WordPress will only keep the 5 most recent revisions for each post or page.