How To Make WordPress Empty Trash After A Number Of Days

Table of Contents


  1. Log in to cPanel.
  2. Click File Manager in Quick Shortcuts

clicking on public html in file manager conorbradley web services

  1. Double click public_html

right clicking on wp config and pressing edit conorbradley web services


pressing edit on wp config php conorbradley web services

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

pasting of the code in wp config conorbradley web services

  1. Add the following line where we have wrote paste here define( ‘EMPTY_TRASH_DAYS’, 5 );
    • Change the number “5” to how many days you’d like WordPress to empty the trash
  2. Click Save Changes.



Need FREE Website Hosting?


Previous How To Login To WordPress
Next How To Setup PayPal To Receive Payments On WordPress