softmaji-header-wbg-min
softmaji-header-wbg-min
softmaji-blue-header-min
softmaji-blue-header-min
  • Home
  • Services
    • Website Designing
      • Responsive Website Design
      • Static Website Design
      • Website Redesign
      • Landing Page Design
    • Website Development
      • PHP Website Development
      • WordPress Website Development
      • Ecommerce Website Development
      • Custom Website Development
    • Digital Marketing
      • Google Adwords/PPC
      • Facebook Promotion
    • SEO Service
  • Trainings
    • Learn Web Development
    • Learn Graphics Design
    • Learn Business Communication Skills
  • Pricing
  • Portfolio
  • Events
  • Offers
  • Contact Us

Learn to Delete Trash in WordPress Automatically.

HomeLearn to Delete Trash in WordPress Automatically.

Offer Expire Soon..


Only New User..


Our WordPress hosting users have asked us so many times to help them by telling them the ways to delete entries in the trash of WordPress automatically. In this knowledge base, we are going to discuss an easy way to delete the trash in WordPress and make some free space in the server.

In WordPress, the wp-config.php function is used to control the time frame for which the data would be held in WordPress trash. So, by editing the period you can reduce the number of days for the data to be retained in WordPress. This makes you free from the regular checking of the trash section before you could manually use the ‘Empty Trash’ button.

Perform the following steps to tweak the default configuration settings in WordPress :

By default, WordPress provides 30 days until data is retained in Trash.

You can check it in the wp-config.php file

define( ‘EMPTY_TRASH_DAYS’, 30 ); // 30 days default

Steps to edit trash settings in WordPress :

To change the defined number of days for WordPress to automatically delete posts in the trash, you can edit this in settings.

For example: If you wish that system should automatically delete entries in the trash after 10 days, then edit the entry as :

/* The following command will automatically delete WordPress trash after 10 days */

define( ‘EMPTY_TRASH_DAYS’, 10 );

Steps to stop WordPress from accumulating posts in Trash :

In order to disable the Trash, you will need to set the number of days to zero.

But, it is not recommended to do so, as it may lose your important entries which cannot be retrieved in case you need it. Thus, avid setting the value to zero.

For any assistance regarding WordPress, please reach our technical team via email or chat support from the website.

Also Read :

1) How To Add Skype Share Button In WordPress?

2) How To Reset Permalinks In WordPress?

Faizan Khan
16
Latest News
Prev PostWays to View Access and WordPress Error LogsMay 14, 2024
Next PostHow To Reset Permalinks In WordPress?May 14, 2024

Related items

2
Latest News

iOS 18.5 vs. iOS 19: Full Comparison of Every Feature

Apple is always updating the software that runs on our iPhones. In 2025, we have two impor

SoftMaji InfoTech
10/07/2025
22
iPhone 17 Air
Latest News

iPhone 17 Air Leak: Full Details on the Super-Thin Design, Features, and Price

Get ready, Apple fans! The internet is buzzing with exciting news about a brand-new iPhone

SoftMaji InfoTech
10/07/2025
18
otpless-issue
Latest News

OTPLess Not Working? Here’s What Happened!

Imagine this: You run a business, and suddenly, your customers can’t log in to your websit

SoftMaji InfoTech
20/06/2025
41
softmaji-header-wbg-min
SoftMaji is one of the affordable web development company in the web development industry. You don’t have to go searching anywhere for finding a reliable web development partner because we have crafted web development solutions that can fill the void left by others in the market.
Services
  • News Portal Development
  • Custom Website Development
  • PHP Website Development
  • Ecommerce Website Development
  • WordPress Website Development
Shortlinks
  • Blog
  • Offers
  • Events
  • Pricing
  • Reviews
  • Portfolio
  • Our Team
  • Payment Options
  • Explore Packages
Company
  • FAQ
  • Careers
  • Sitemap
  • Feedback
  • About Us
  • Contact Us
  • Privacy Policy
  • Terms & Conditions
  • Refund And Cancellation
Contact Us
4/40 Vipul Khand , Gomti Nagar Lucknow
Uttar Pradesh 226010
Landline - +915223162418
Email - hello@softmaji.in
Office Time Mon - Sat
(10:00AM - 5:00PM)
Sunday Close
+91 9795405324
Lucknow , Uttar Pradesh
Copyright © 2016-2025. All Rights Reserved.