By: Prem Tiwari | Last Updated:
Hi friends, hope you are doing good. This is a very short tutorial about WordPress tips, this tips will help you more while developing WordPress websites.
If you want to delete all trash items automatically after a certain day from your WordPress websites, then this tutorial help you more, keep your close attention in this post as I am going to share how to empty trash automatically after some day in WordPress.
Open wp-config.php file from root directory of your website and copy paste below code snippet at the end of the file and save it. below code will automatically be deleted the trash items from your WordPress websites. It will work for WordPress posts and WordPress pages trash to empty automatically after you 5 days.
< ?php define('EMPTY_TRASH_DAYS', 5 ); ?>
Hope this tutorial help you, if you have any WordPress related question, then add your comments in bellow comment section. I will be happy to answer your comments and also do like & share this article with your friends on social media also subscribe my blog to get all my new tips and tricks directly in your mail box.
Prem Tiwari is the founder of FreeWebMentor.com and also a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies. View all posts by Prem Tiwari