This article describes how to optimize the trash settings in WordPress.
The trash feature in WordPress allows you to recover posts, comments, pages, and attachments that have been deleted. By default, this recovery period is 30 days. After 30 days, WordPress permanently deletes items in the trash folder and they are gone forever.
Although the trash feature is convenient, items marked as trash take up space in the database. If your site receives heavy traffic or contains a lot of content, the amount of database space occupied by trash items could be significant, and potentially impact database performance.
To reduce the amount of time that trash items are stored in the WordPress database, reduce the recovery period from 30 days to a shorter interval. To do this, follow these steps:
define( 'EMPTY_TRASH_DAYS', X );
require_once(ABSPATH . 'wp-settings.php');
Subscribe to receive weekly cutting edge tips, strategies, and news you need to grow your web business.
No charge. Unsubscribe anytime.
Usamos cookies para personalizar o site para você e para analisar o uso do nosso site. Você demonstra que concorda com isso ao clicar em "Eu concordo" ou ao continuar usando este site. Mais informações sobre cookies podem ser encontradas em nossa Política de privacidade.