How to make empty wordpress trash automatically

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.

Published by

Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

Leave a Reply

Your email address will not be published.