Delete old copies of posts in WordPress

Last Revised: October 2, 2021

Once again we return to issues that mainly affect performance and, in this case, it is to empty the database of old copies of entries or pages. As you update content, old copies are created. As a general rule, these copies are not accessible, but if you want to delete an element that may have content that should never have been there, it is best to limit the time or amount of previous elements.

To do this we will add to the configuration file [wp-config.php] the number of days we want an item to remain in the trash:

define('EMPTY_TRASH_DAYS', 1);

The next element is if we want to back up the entries, how many, if yes:

define('WP_POST_REVISIONS', 5);

or else:

define('WP_POST_REVISIONS', false);

Seguir con Seguridad para WordPress


About this document

This document is regulated by the EUPL v1.2 license, published in WP SysAdmin and created by Javier Casares. Please, if you use this content in your website, your presentation or any material you distribute, remember to mention this site or its author, and having to put the material you create under EUPL license.