How To Limit or Disable Trash Feature in WordPress 2.9

2.9 introduces a new feature which allows you to Trash a post instead of actually deleting it. If you use WordPress 2.9, you will see that the delete link has been replaced by Trash.


Change Trash Retain Limit

By Default WordPress 2.9 is set to retain the Trash posts for 30 days, unless you manually delete it. To curtail the number of days trash post is stored for, add this line to your wp-config.php file.

   1: define('EMPTY_TRASH_DAYS', 7);

Doing this will limit the trash to only 7 days, change the number to limit to any other number of days you want.

Disabling Trash Feature Completely

If you do not want the trash feature, you can always disable it. However, you will need to add a line to your wp-config.php file.

   1: define('EMPTY_TRASH_DAYS', 0);


Doing this will ensure that no posts are store in the trash. In addition to that, the Trash link will display Delete Permanentlyinstead.

Published by

Keith Dsouza

I am the editor-in-chief and owner of Techie Buzz. I love coding and have contributed to several open source projects in the past. You can know more about me and my projects by visiting my Personal Website.I am also a social networking enthusiast and can be found active on twitter, you can follow Keith on twitter @keithdsouza. You can click on my name to visit my Google+ profile.