Back to Community

Fixing Common WP Super Cache Errors: A Troubleshooting Guide

30 threads Sep 16, 2025 PluginWp super cache

Content

WP Super Cache is a powerful tool for speeding up your WordPress site, but like any complex plugin, it can sometimes throw confusing errors. Based on community reports, here are the most common WP Super Cache errors and how to resolve them.

1. "Failed opening wp-cache-phase1.php" or Advanced Cache Errors

The Problem: After uninstalling WP Super Cache or migrating a site, you see warnings about missing files like wp-cache-phase1.php in your advanced-cache.php file. This often prevents access to your WordPress admin area.

Why it Happens: The uninstall process sometimes doesn't fully clean up the necessary files. The wp-config.php file still contains the define('WP_CACHE', true); line, and the advanced-cache.php file remains, trying to load the now-deleted plugin files.

The Solution:

  1. Use an FTP client or your hosting provider's file manager to access your site's root directory.
  2. Locate and edit the wp-config.php file.
  3. Find the line that says define('WP_CACHE', true); and delete it or change true to false.
  4. Next, navigate to the wp-content folder and delete the advanced-cache.php file.
  5. The warnings should disappear immediately.

2. "Permission denied" Errors on wp-cache-config.php

The Problem: Your error logs are flooded with messages like rename(...): Permission denied in ...wp-cache-phase2.php on line 1263. You may also see temporary PHP files piling up in your cache folder.

Why it Happens: The web server's PHP process (e.g., www-data, nginx, apache) does not have write permissions for the wp-content directory. This prevents WP Super Cache from updating its configuration file.

The Solution:

  1. Check the ownership and permissions of your wp-content directory using FTP or SSH.
  2. The correct permissions are typically 755 for directories and 644 for files. The owner should be your web server user.
  3. You may need to contact your hosting provider's support to safely correct the file permissions if you are unsure how to do it yourself.

3. "open_basedir restriction in effect" Warnings

The Problem: Warnings appear stating that a cache file is not within the allowed path(s), often referencing a root directory (/) instead of the correct site path.

Why it Happens: The plugin's internal path configuration can become corrupted, often after a site migration or update, causing it to look for files in the wrong location.

The Solution:

  1. First, try visiting the WP Super Cache settings page in your WordPress admin and simply clicking "Save Changes." This can reset the paths.
  2. If that fails, go to the "Advanced" tab in the plugin's settings and use the "Delete Expired" and "Delete Cache" buttons.
  3. As a last resort, you can manually delete the wp-content/wp-cache-config.php file. The plugin will regenerate it with the correct paths when you next load its settings page (ensure file permissions are fixed first, as in solution #2).

4. PHP 8+ Fatal Error: "fclose(): Argument must be of type resource, bool given"

The Problem: On servers running PHP 8.0 or newer, a fatal error occurs on line 2357 (or similar) of wp-cache-phase2.php, crashing the site.

Why it Happens: This is a compatibility issue where the code attempts to close a file pointer that doesn't exist (is false) because the initial file operation failed. PHP 8+ enforces strict type checking for such functions.

The Solution:

  1. This bug has been fixed in newer versions of WP Super Cache.
  2. Ensure your plugin is updated to the latest available version.
  3. If the update does not resolve the issue, check the plugin's official repository for any further patches.

General Best Practices

  • Always Disable Properly: Before uninstalling the plugin or migrating a site, go to Settings > WP Super Cache and click "Delete Cache" followed by "Disable Caching." Then deactivate the plugin from the Plugins page.
  • Check File Permissions: Many issues stem from incorrect file permissions. This is a common setup requirement for caching plugins.
  • Review Your Error Logs: Most hosting providers offer access to PHP error logs. These logs are the first place to look when diagnosing any WordPress error.

By following these steps, you can resolve the majority of common errors encountered with the WP Super Cache plugin.

Related Support Threads Support