internet

Empty the Trashed content in WordPress automatically

The trashed content that is present in your WordPress can be emptied so automatically by adding a single line of code in wp-config.php. Below we have mentioned a small tutorial for it.
The wp-config.php file is located at the root of your FTP server. You will need:
From an FTP client such as FileZilla or Transmit to download
Your FTP login details
Once connected, change the wp-config.php file and add this line of code.
define (‘EMPTY_TRASH_DAYS’, 5);
The number “5” defined the number of days. Here, the trash will be cleaned automatically within “5” days. Feel free to change this value!
This was a simple and effective hack to optimize WordPress in general.

Leave a Reply

Your email address will not be published. Required fields are marked *