Back to Community

Understanding and Fixing WP Super Cache Garbage Collection Issues

20 threads Sep 16, 2025 PluginWp super cache

Content

WP Super Cache is a powerful tool for speeding up your WordPress site, but one of its most common points of confusion revolves around its Garbage Collection system. This process is responsible for automatically cleaning up expired cache files to save disk space. When it malfunctions, you might see warning messages, receive unexpected emails, or find your server storage filling up with old files.

Based on community reports and troubleshooting threads, here’s a breakdown of the most common garbage collection problems and how to resolve them.

Why Garbage Collection Matters

Garbage collection is a scheduled task that deletes cached pages that have passed the "Cache Timeout" period you set in the plugin's settings. If this process fails, your server will accumulate stale files that are no longer being served to visitors, wasting valuable disk space.

Common Problems and Their Solutions

1. The "CRON System Disabled" Warning

The Problem: You see a persistent warning message stating "The WordPress CRON jobs system is disabled." This means the plugin cannot automatically schedule its garbage collection task.

Why It Happens: This warning appears when the DISABLE_WP_CRON constant is set to true in your wp-config.php file. Many hosts recommend this to prevent the default WordPress cron from running on every page load, which can impact performance on high-traffic sites.

The Solution: If you are using an external cron system (like a service from your hosting control panel or a third-party website), the garbage collection can still work. The warning is often just cosmetic. To hide it, you can manually edit the wp-content/wp-cache-config.php file and change the line $wp_cache_cron_check = 0; to $wp_cache_cron_check = 1;. This tells the plugin to stop checking for the WordPress cron.

2. Garbage Collection Is Not Running

The Problem: Expired cache files are not being deleted, and the "Expired Pages" count keeps growing.

Why It Happens: This can occur if the WordPress cron system is truly disabled without a replacement, or if there is a conflict preventing the task from executing properly.

The Solution: You need to ensure a cron system is in place. If DISABLE_WP_CRON is set to true, you must set up a manual system cron job. A common command to run via your host's cron job manager is:

wget -q -O - http://yourdomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

This command should be set to run at regular intervals (e.g., every 15 minutes or every hour).

3. Garbage Collection Emails: Too Many or None at All

The Problem: You are receiving frequent emails stating "deleting 0 files" or you never receive a confirmation email when the process runs.

Why It Happens: The email settings for garbage collection are separate from the preload email settings. If you are getting emails, the feature is enabled. If you are not getting them, your server may have issues sending mail, or the process may not be running at all.

The Solution: To disable emails, navigate to Settings -> WP Super Cache -> Advanced and scroll down to the Garbage Collection section. Uncheck the box that says "Email me when the garbage collection runs." To troubleshoot if it's running, enable debug logging in the plugin's settings and set the cache timeout to a short period (like 60 seconds) to force a quick test.

4. Garbage Collection Runs When It Should Be Disabled

The Problem: You set the Cache Timeout to 0 to disable garbage collection, but it still runs.

Why It Happens: This is unusual behavior. A timeout of 0 should disable the scheduler entirely.

The Solution: Use a plugin like WP Crontrol to check if there are any scheduled tasks related to wp_cache_gc. You can try to manually unschedule any events you find there.

Final Tips

  • Debugging: When in doubt, enable the debug log from the plugin's Advanced settings. This will create a detailed log file that can show you exactly what the garbage collector is doing (or not doing).
  • Password Protection: If your site is password protected (e.g., under construction), the garbage collector may not be able to access the necessary files to run. This usually resolves itself once the site is live and accessible.
  • It's Usually a Cron Issue: The vast majority of garbage collection problems are related to the WordPress cron system. Understanding how your cron is configured is the key to solving most issues.

By understanding how WP Super Cache's garbage collection interacts with your WordPress cron system, you can effectively troubleshoot these common warnings and errors, ensuring your cached files are managed efficiently.

Related Support Threads Support