Empty trash with wp-config

WordPress leave everything we erase in the trash so if we need to use it again we can do that. Sometime this can be bad for our database and the speed of the website. It’s a good way optimize everything to upgrade the quality of our project.

One thing you can do is automatically empty the trash every day or every week. You can do that with just a simple instruction in your wp-config.php file.

define('EMPTY_TRASH_DAYS', 1 );

Just add this and change the number of how many days you want.