How to make empty wordpress trash automatically

Sometimes we create pages and posts which are unwanted. In this article, I given code for make empty wordpress trash automatically. Using code deleted items will automatically delete from trash. Open your wp-config.php file which is in the root directory of wordpress installation.

How to make empty wordpress trash automatically

How to make empty wordpress trash automatically

How to make empty wordpress trash automatically

define('EMPTY_TRASH_DAYS', 7 );

Above code will delete the comments from trash section after every seven days.

Seven days are safe to keep trash. This is simple but good option to keep in your wordpress blog.

Add a Comment

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