When the trash feature is enabled, the deleted posts are moved to trash and stored there for 30 days. And there is a schedule/wp_cron event that is responsible for removing these posts permanently after that time.

Is there any easy way to change that time?

1 Answer 1


You can change that in wp-config (https://codex.wordpress.org/Editing_wp-config.php#Empty_Trash):

define( 'EMPTY_TRASH_DAYS', 1 ); // Integer is the amount of days

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.