DISCLAIMER: this post is older than one year and may not be up to date with latest WordPress version.

Trash is a new functionality from WordPress 2.9. 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.

Tags

2 Comments

  1. And If I want to bypass the trash function? I tried with 0 value but It doesn’t work 🙁 … thanks!

  2. Sorry, it works! Before I put it in the file functions!! I’m stupid 🙂

Leave a Comment

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