Configure WordPress Trash

WordPress-Christmas-07Check out our 7th door of our Advent Calendar.

WordPress Trash will have it’s premiere in version 2.9. Now you can move every content, comment, post, pages, media and link to trash. It’s quite the same function as you know from other online applications or operating systems.

If you like to configure a special date of how long files should be kept in your trash, you can configure it in your wp-config.php.
define( 'EMPTY_TRASH_DAYS', 10 );

The default settings deletes your content after 30 days. If you don’t want to use trash at all, just use the value 0.

define('EMPTY_TRASH_DAYS', 0);

Now there is no trash in your admin area available, and also no links to move files to your trash.





3 responses to “Configure WordPress Trash”

  1. […] welcher gelöschte Einträge speichert. Wie man mit diesem Recycle Bin umgeht kann man auf […]

  2. Antonie Potgieter Avatar

    Awesome, thank you for this tip! Another useful thing to note is that when a post is in the trash, its “post_status” in the “wp_posts” database table is set to “trash”. All the best, Antonie

  3. sanaa Avatar

    thank you,

    in my case the problem with the trash is that the special properties of my post are lost when the post is in the trash,
    when restored, only title and content are restored and not the others !

    any idea please ?