Thursday, November 23, 2017

How to Automatically Empty Your WordPress Trash


There was a feature added to wordpress version 2.9 then called trash. This feature works just like the recycling bin, so instead of deleting the post permanently, you would send it to the trash. This helped those users who accidentally click on Delete button,
and it can be any of us. The bad part about this trash feature is that you have to empty the trash regularly. By default the trash empties itself every 30 days.
Now am going to show you how you can empty the trash in a day, week or how long or short you want it to be
what  you have to do is open your wp-config.php file. This will is usually located in the same directory where wp-includes is located.

<div id="highlighter_609344" class="syntaxhighlighter php">
<table border="0" cellspacing="0" cellpadding="0">
<td class="gutter">
<div class="line number1 index0 alt2">1</div></td>
<td class="code">
<div class="container">
<div class="line number1 index0 alt2"><code class="php plain">define(</code><code class="php string">'EMPTY_TRASH_DAYS'</code><code class="php plain">, 1 ); </code><code class="php comments">//Integer is the amount of days</code></div>

Change the 1 to 7 or however many days you want. If you don’t like the trash feature at all, then you can always set the number to 0, and get rid of it entirely.
Please help me to share this post and drop a comment if you have any difficulty concerning this post. Thanks


Aditya said...

wow.. very important knowledge you have written in this post..
Glad to read this blog. great work

Prince PK said...

hi Waheed.
very informative article.
thabks for sharing.'
Dollars, Euros


Very good articles,Really helpful,Thank you for sharing this information,keep up the good work

Anything OnThisUniverse said...


great worpress pluin information which you have been sharing
here So please keep it up..

Abhishek Singh said...

hii sir,
nice article and keep sharing with us.
keep it up.

Post a Comment