wp limit post revisions

To limit post revisions in WordPress, follow these steps:

  1. Access your WordPress website's admin dashboard.

  2. Navigate to the "wp-config.php" file, typically located in the root directory of your WordPress installation.

  3. Open the "wp-config.php" file using a text editor.

  4. Insert the following code snippet before the line that says "/ That's all, stop editing! Happy blogging. /":

// Limit post revisions
define('WP_POST_REVISIONS', 5);

Replace "5" with the desired number of revisions you want to keep.

  1. Save the changes to the "wp-config.php" file.

By following these steps, you will limit the number of post revisions to the specified value, helping to manage database size and improve performance.