Change How Often WordPress 2.9 Takes Out the Trash

Need to take out the trash? Introduced in WordPress 2.9, the trash feature can bloat your database unless you empty it regularly. Problem solved.

The recent release of WordPress 2.9 brought a great new feature: the trash. Now users have a way to recover deleted posts and comments. By default, WordPress empties the trash every 30 days.

If you’d like to change how often the trashed information is removed, simply open up wp-config.php and define the following constant:

1
define('EMPTY_TRASH_DAYS', 15 );  // 15 days

Just change 15 to the frequency in days that you want WordPress to empty the trash. It’s that simple!

Leave a Reply

Your email address will not be published. Required fields are marked *