Disable automated deletion of trashed items in WordPress

WordPress automatically removes items such as posts, pages, comments and attachments when they have been put in the trash. Add the below snippet to your wp-config.php file to disable removal of items permanently.

define( 'EMPTY_TRASH_DAYS', PHP_INT_MAX );

Leave a Reply

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

Markdown is allowed in comments.