On your WordPress blog, when an item like a post or comment is deleted, it goes in Trash instead of being permanently removed. Here is a super simple code snippet to tell WordPress to automatically empty the trash everydays.
Simply open your wp-config.php file (Located at the root of your WordPress install) and add the following line of code:
Replace 1 by X to empty spam comments automatically every X days. That’s simple as that!