Automatically empty trash

Trash is a new functionality from WordPress 3.0. When an item (post, comment, etc) is deleted, it goes in Trash instead of being permanently removed. Here is a tip to tell your WordPress blog to autmatically empty trash every X days.

Simply open your wp-config.php file (located at the root of your WordPress install) and paste the following code:

define('EMPTY_TRASH_DAYS', 10 );

The second parameter is when to empty trash, in days.

Leave a Reply

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