Empty Trash Days controls how long WordPress keeps deleted content before permanently deleting it. Adjust this to give yourself a recovery window, or set it to zero to delete immediately.

What this feature does

When you delete a post, page, or comment in WordPress, it doesn't disappear immediately. Instead, it goes into the trash, where it stays for a grace period before being permanently deleted. By default, this period is 30 days. If you change your mind within those 30 days, you can restore the content from the trash.

This setting lets you customize that grace period. You can extend it to 90 or 365 days if you like a long recovery window, shorten it to 7 days if you clean up frequently, or set it to zero to delete permanently without any trash period. You can also configure different retention for posts, pages, comments, and other content types.

For peace of mind

A longer trash retention period (30 days or more) gives you a safety net if you accidentally delete something. However, it uses database space. A shorter period (1-7 days) keeps your database lean but gives you less time to recover accidentally deleted items.

How to enable it

  1. Open AdminEase and navigate to Posts. Click AdminEase in the WordPress admin menu, then switch to the Posts tab.
  2. Select your trash retention period. In the Empty Trash Days dropdown, choose how long to keep deleted content: 1 day, 7 days, 30 days (default), 90 days, 365 days, or 0 to disable trash (delete permanently).
  3. Save settings. AdminEase writes the constant to wp-config.php immediately.
  4. Verify. Delete a test post and confirm it appears in your trash. After the retention period expires (or immediately if you chose 0), it should be permanently deleted.

Settings reference

Setting What it does Default
Empty Trash Days Sets how many days deleted posts, pages, and comments remain in trash before permanent deletion. Options: 0 (disable trash, delete immediately), 1, 7, 14, 30, 60, 90, 180, or 365 days. Set to 0 for immediate permanent deletion without a recovery window. 30 days

What gets written to wp-config.php

WordPress trash constant

AdminEase writes the EMPTY_TRASH_DAYS constant to wp-config.php:

define( 'EMPTY_TRASH_DAYS', 30 );

The number is the number of days to keep content in trash. Set it to 0 to disable trash entirely. WordPress reads this at startup and applies it to all trash cleanup operations.

Troubleshooting

I deleted something, but it's not in the trash

Check that you have trash enabled in your settings. If you set Empty Trash Days to 0, items are permanently deleted immediately without going to trash. If trash is enabled, check the Trash submenu under Posts or Comments in your WordPress admin.

I want to recover something from trash, but the days are running out

Click into your trash (e.g., Posts > Trash) and manually restore the item by clicking "Restore". This doesn't wait for the timer. You can recover items from trash anytime before the period expires.

My database is growing because of old trash. What should I do?

You have two options. First, empty your trash manually in the WordPress admin to delete all trash items immediately. Second, reduce the trash retention period to force WordPress to empty trash more frequently (e.g., change from 30 days to 7 days). Either way will free up database space.

Should I disable trash entirely (set to 0)?

Only if you're confident you won't accidentally delete items and need every kilobyte of database space. With trash disabled, there's no recovery window. For most sites, a 7-30 day retention period strikes a good balance between safety and database efficiency.