Enable trash feature for media

by | 6 August 2018 | WordPress | 2 comments

By default, media files that you delete in the media browser are permanently deleted. However, WordPress has a trash can feature that is disabled by default. Fortunately, this can be switched on.

To enable this feature, you must add the code below to the wp-config.php file

// Switch on media trash
define (‘MEDIA_TRASH’, true);

Once you have done this, the permanent removal option will be replaced by trash.

2 Comments

  1. Peggy

    Thanks for this tip – so now that I have my media trash enabled and items in my media trash, how do I empty the items OUT of the trash?

    Reply
    • Ivar Snel

      Hi Peggy,

      This can be done by adding the plugin Media Trash Button to your installation. This plugin adds a trash button to the media library where you can delete media from the bin.

      See: https://wordpress.org/plugins/media-trash-button/

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *