WordPress Tip: Automatically Empty Trash

Your Trash is a function that was added in WordPress 2.9. When an item (post, comment, etc) is deleted, it goes in Trash instead of being permanently removed. You can easily tell your WordPress blog to automatically empty trash every X days.

Just 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. So in this example it will empty your trash automatically every 10 days. And if we want to completely disable the trash? You can put a zero as your second parameter.