• 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
  • 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

Proud Member

Recent Posts

  • What Generative Engine Optimization Is (And Why It’s Different)
  • March to Momentum: The Local Business Owner鈥檚 Spring Promo Playbook
  • Cracking the Code to Creating Great Local Content
  • How to Spend Your Morning Like a Successful Entrepreneur
  • 6 Critical Website Maintenance Tasks That Protect Your Business (New Year Checklist)

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

Contact Us 609.638.7285

Copyright © 2026 路 Digital Maestro 路 Disclaimer 路 Privacy Policy 路 Terms of Service 路 Accessibility 路 Stay Awesome!