How to Automatically Empty Your Trash in WordPress [Quick Tips]

In WordPress, there is this “Trash” feature that keep your deleted articles (and comments) in the recycle bin until you go into the bin and delete them permanently. This is an useful feature as it prevents you from deleting any posts/comments accidentally. However, if you don’t have the habit of clearing your trash regularly, it would pile up with useless articles, which in turn translate to bigger database size and slower site loading.

Here’s a quick and simple way to configure your WordPress to automatically clear the trash on a regular basis: 1. Using a FTP application (such as Filezilla), download the wp-config.php file from your server.

2. Open the wp-config.php file with a text editor and insert the following code to the end of the file: