Empty WordPress trash automatically

Want to automatically empty your WordPress trash? You can do so by adding the following snippet to your wp-config.php file.

// Empty trash after 10 days
define('EMPTY_TRASH_DAYS', 10 );

– LAST TESTED DECEMBER 9, 2019

Code not working? Let us know in the comments below.

Latest Snippets

Leave a comment