• Skip to main content
  • Skip to primary sidebar

Digital Maestro

Harmonizing Your Online Strategy

  • Home
  • About
  • Work With Us
    • Coaching
      • One-on-One Coaching
    • Services
      • Set Up Services
      • Website Maintenance
  • Products
    • WPICA
    • WP Security Help
  • Blog
    • Affiliate Marketing
    • Plugins
    • Business
  • Resources
    • Registrar
    • Hosting
  • Contact

Dec 21 2011

Empty The WordPress Trash

Empty Trash

Added back in WordPress version 2.9,  WordPress Trash will automatically get deleted every 30 days. This trash will permanently delete any Posts, pages, attachments, and comments that were sent to Trash. By default, this happens every 30 days.

There is a way, however, to change that, if you want to. If you are making a lot of changes, if you are not sure of creating a post and then delete them, or you delete a lot of spam comments, you might want to empty the trash on a more regular basis – and do it automacgically!

Once again, I have to give my warning… First make a back up of your site files – not just your database. In order to change the trash schedule, you will need to modify one of the core WordPress files:

wp-config.php

This file gets created when you installed WordPress onto your site. You may or may not have the line needed in the wp-config file. If it not there, simply add the line at the end of the file. If it is there, You can change

define('EMPTY_TRASH_DAYS', 30 );  // 30 days

To disable trash set the number of days to zero. Note that WordPress will not ask for confirmation when someone clicks on “Delete Permanently”.

define('EMPTY_TRASH_DAYS', 0 );  // zero days

Again, make sure you are careful with these changes – deleting the wrong character by mistake could make your day a little less than enjoyable 🙂

 

Written by Paul · Categorized: General

Reader Interactions

Comments

  1. Paul says

    December 21, 2011 at 12:09 pm

    Wow! I already had 2 people ask if I would make this change for them. If you want any work done, just send me a note via the Contact Page and I will get back to you!

    Reply
  2. Roy A. Ackerman, Ph.D., E.A. @Cerebrations.biz says

    December 21, 2011 at 2:52 pm

    I believe we must empty our own trash- often. Before it begins to accumulate and detract from the performance (or environmental odors) of the whole…

    Reply
    • Paul says

      December 21, 2011 at 4:59 pm

      Yes, Roy! I always love your comments!

      Reply
  3. denny hagel says

    December 22, 2011 at 10:33 am

    Love the value you always provide in your articles and this one is no exception! Thanks and happy holidays!:)

    Reply
    • Paul says

      December 23, 2011 at 8:18 am

      Thanks, Denny! Happy Holiday to you as well!

      Reply
  4. Annemarie Cross says

    December 22, 2011 at 6:17 pm

    Another great post Paul; thank you!

    Reply
    • Paul says

      December 23, 2011 at 8:19 am

      My pleasure, Annemarie!

      Reply
  5. Elvie Look says

    December 22, 2011 at 7:18 pm

    Wow, I never even thought of this before. Thanks for keeping us on top of WordPress!

    Reply
    • Paul says

      December 23, 2011 at 8:19 am

      Elvie – I hope I am not giving you too much info that is making your head spin!

      Reply
  6. Hughie Bagnell says

    December 23, 2011 at 2:48 pm

    Thank you Paul for your advice on WordPress…I have fortunately established the habit of doing this daily on a manual basis…always great advice! …Cheers, Hughie 🙂

    Reply

Leave a Reply Cancel reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

UpCity: Best of New Jersey

UpCity Best of New Jersey

Proud Member

Recent Posts

  • QR Codes Aren’t Dead — You’re Just Using Them Wrong
  • Your Next Hire Might Be an AI Agent: How Local Businesses Are Automating Customer Service in 2025
  • The Review Whisperer: How to Get More 5-Stars Without Begging or Bribing
  • Google’s AI Overviews Are Stealing Your Clicks — Here’s How to Fight Back
  • What Your Landscaping Business Might Be Missing Online (And How to Fix It)

WordPress Topics

  • Affiliate Marketing
  • Blogging Category
  • Business Building
  • Coaching Category
  • General
  • List Building
  • Marketing
  • Plugins
  • Resources
  • SEO
  • Services
  • Social Media
  • Themes
  • Traffic
  • Uncategorized
  • Video Subscription
  • Webinar
  • WordPress Online Strategy

Missinglettr

Copyright © 2025 · Digital Maestro · Disclaimer · Privacy Policy · Terms of Service · Accessibility · Stay Awesome!