---
title: How To Make WordPress Empty Trash After A Number Of Days
description: "# How To Make WordPress Empty Trash After A Number Of Days 1. Log in to cPanel. 2. Click File Manager in Quick Shortcuts 3. Double click public_html ![Showing WP Config.php changed from wp config sample.php in file manager Conor…"
url: "https://conorbradley.co.uk/kb/make-wordpress-empty-trash-automatically/"
updated: "2022-05-05"
category: Website Software Setup Guide
tags:
  - empty trash
---

# How To Make WordPress Empty Trash After A Number Of Days

# How To Make WordPress Empty Trash After A Number Of Days

1. Log in to cPanel.
2. Click File Manager in Quick Shortcuts
3. Double click public_html

![Showing WP Config.php changed from wp config sample.php in file manager Conor Bradley Digital Agency](https://conorbradley.co.uk/wp-content/uploads/Showing-WP-Config.php-changed-from-wp-config-sample.php-in-file-manager-Conor-Bradley-Digital-Agency.png)

1. Locate the file wp-config.php, Right Click, and press edit.
2. Press Edit again

![typing define EMPTY TRASH DAYS 5 in to the wp config.php file then pressing save changes Conor Bradley DIgital Agency](https://conorbradley.co.uk/wp-content/uploads/typing-define-EMPTY_TRASH_DAYS-5-in-to-the-wp-config.php-file-then-pressing-save-changes-Conor-Bradley-DIgital-Agency.png)

1. Add the following line where we have written paste here
2. > define( 'EMPTY_TRASH_DAYS', 5 );
3. > Change the number "5" to how many days you'd like WordPress to empty the trash
4. > Click Save Changes.

 

 

                                             [Facebook](https://www.facebook.com/conorbradleydigitalagency) | [Twitter](https://twitter.com/ConorAgency) | [Instagram](https://instagram.com/conorbradleydigitalagency) | [Youtube](https://youtube.com/conorbradleydigitalagency) | [Vimeo](https://vimeo.com/conorbradleyagency) | [Blog](https://conorbradley.co.uk/blog/) | [Knowledge Base](https://conorbradley.co.uk/kb/)
