Home  >  Article  >  CMS Tutorial  >  How to make WordPress automatically empty the recycle bin

How to make WordPress automatically empty the recycle bin

藏色散人
藏色散人forward
2019-11-11 11:37:012471browse

The following column WordPress Tutorial will introduce to you how to let WordPress automatically empty the recycle bin. I hope it will be helpful to friends in need!

How to make WordPress automatically empty the recycle bin

#The recycle bin is a newly added feature after WordPress was upgraded to 2.9. When an item (blog, comment, etc.) is deleted, it is not permanently deleted. Instead, it is saved in the recycle bin and can be restored if the deletion is deemed wrong. But sometimes when you really think that the deleted items are no longer necessary, you still need to manually empty the trash bin, which is troublesome. Here is a little trick for you. Specify WordPress to automatically empty the trash bin every fixed number of days.

Open your wp-config.php file (in the root directory of your WordPress installation) and paste the following code:

define('EMPTY_TRASH_DAYS', 10 );

The number 10 represents, retained for 10 days, when set to At 0, the recycle bin function is disabled.

The above is the detailed content of How to make WordPress automatically empty the recycle bin. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:zmingcx.com. If there is any infringement, please contact admin@php.cn delete