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.

wordpress_29_trash_post

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);

disable_trash_feature_in_wp29

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

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>