Are you looking for a way to automatically empty trash items? This snippet will automatically empty trash items that have been in the trash more than 3 days.
All you have to do is add this code the wp-config.php file in the root directory of your wordpress install.
define('EMPTY_TRASH_DAYS', 3 );
Note: If this is your first time adding code snippets in WordPress, then please refer to our guide on how to properly copy / paste code snippets in WordPress, so you don’t accidentally break your site.
If you liked this code snippet, please consider checking out our other articles on the site like: How to Easily Back Up Your WordPress Site (Step by Step).