How to Automatically Empty Your WordPress Trash
In WordPress 2.9, there was a new “Trash” feature added to the core. This feature works just like the recycling bin, so instead of deleting the post permanently, you would send it to the trash. This helped those users who accidently click on Delete button, and it can be any of us. The bad part about this trash feature is that you have to empty the trash regularly. By default the trash empties itself every 30 days. But in this article, we will show you how you can automatically empty your trash daily, weekly, or however many days you want.
All you have to do is open your wp-config.php file. This will is usually located in the same directory where wp-includes is located.
define('EMPTY_TRASH_DAYS', 1 ); //Integer is the amount of days
Change the 1 to 7 or however many days you want. If you don’t like the trash feature at all, then you can always set the number to 0, and get rid of it entirely.