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

How to make WordPress automatically empty the recycle bin

藏色散人
Release: 2019-11-11 11:37:01
forward
2609 people have browsed it

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 );
Copy after login

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!

Related labels:
source:zmingcx.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template