WP Super Cache

Error with WP Super Cache

You may have this kind of error with WP Super Cache :

Warning: include_once(/wp-content/plugins/wp-super-cache/wp-cache-phase1.php): failed to open stream: No such file or directory in /wp-content/advanced-cache.php on line 22

Warning: include_once(): Failed opening ‘/wp-content/plugins/wp-super-cache/wp-cache-phase1.php’ for inclusion (include_path=’.:’) in /wp-content/advanced-cache.php on line 22

Warning: Cannot modify header information – headers already sent by (output started at /wp-content/advanced-cache.php:22) in /wp-includes/functions.php on line 6221

Warning: Cannot modify header information – headers already sent by (output started at /wp-content/advanced-cache.php:22) in /wp-admin/includes/misc.php on line 1259

Warning: Cannot modify header information – headers already sent by (output started at /wp-content/advanced-cache.php:22) in /wp-admin/admin-header.php on line 9

Or :

PHP Fatal error: Uncaught TypeError: fclose(): Argument #1 ($stream) must be of type resource, bool given in /wp-content/plugins/wp-super-cache/wp-cache-phase2.php:3227

Or :

PHP Fatal error:  Uncaught Error: Cannot use object of type WP_Query as array in /wp-content/plugins/wp-super-cache/wp-cache-phase2.php:3095
Stack trace:
#0 /wp-content/plugins/wp-super-cache/wp-cache-phase2.php(2557): wp_cache_post_id()
#1 /wp-content/plugins/wp-super-cache/wp-cache-phase2.php(1876): wp_cache_shutdown_callback()
#2 [internal function]: wp_cache_ob_callback('...', 9)
#3 /wp-includes/functions.php(4669): ob_end_flush()
#4 /wp-includes/class-wp-hook.php(287): wp_ob_end_flush_all('')
#5 /wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array)
#6 /wp-includes/plugin.php(478): WP_Hook->do_action(Array)
#7 /wp-includes/load.php(1001): do_action('shutdown')
#8 [internal function]: shutdown_action_hook()
#9 {main} thrown in /wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 3095

Or :

The file /data/advanced-cache.php has been recreated and WPCACHEHOME fixed in your wp-config.php. Reload to hide this message.

Or :

PHP Warning: rename(/wp-content/cache/wpscGNSWwC.php,/wp-content/wp-cache-config.php): Permission denied in /wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 1263

Or :

PHP Warning: Invalid argument supplied for foreach() in /wp-content/plugins/wp-super-cache/wp-cache.php on line 2050

Or :

Notice: Trying to access array offset on value of type bool in /wp-content/plugins/wp-super-cache/wp-cache.php on line 3716

Or :

Error: Configuration file /wp-content/wp-cache-config.php is missing. Please reload the page.

Warning! Could not update /wp-config.php! WPCACHEHOME must be set in config file.

Warning! /wp-content/advanced-cache.php does not exist or cannot be updated.

Or :

Error: Configuration file /wp-content/wp-cache-config.php is missing. Please reload the page.

Warning! Could not update /wp-config.php! WPCACHEHOME must be set in config file.

Warning! /wp-content/advanced-cache.php does not exist or cannot be updated.

If it already exists, please delete the file first.
Make /wp-content writable using the chmod command through your ftp or server software. (chmod 777 /wp-content) and refresh this page. This is only a temporary measure and you’ll have to make it read only afterwards again. (Change 777 to 755 in the previous command)
Refresh this page to update /wp-content/advanced-cache.php
If that doesn’t work, make sure the file /wp-content/advanced-cache.php doesn’t exist

Or :

PHP Warning:  include_once(/wp-content/plugins/wp-super-cache/wp-cache-phase1.php): failed to open stream: No such file or directory in /wp-content/advanced-cache.php on line 22
PHP Warning:  include_once(): Failed opening '/wp-content/plugins/wp-super-cache/wp-cache-phase1.php' for inclusion (include_path='.:/usr/share/php') in /wp-content/advanced-cache.php on line 22

Or :

Warning! You may not be allowed to use this plugin on your site.
The file /wp-content/advanced-cache.php was created by another plugin or by your system administrator. Please examine the file carefully by FTP or SSH and consult your hosting documentation.

If it was created by another caching plugin please uninstall that plugin first before activating WP Super Cache. If the file is not removed by that action you should delete the file manually.

If you need support for this problem contact your hosting provider.

Or :

Error: Configuration file /wp-content/wp-content/wp-cache-config.php is missing. Please reload the page.

Or :

Warning! You may not be allowed to use this plugin on your site.
The file /wp-content/wp-content/advanced-cache.php was created by another plugin or by your system administrator. Please examine the file carefully by FTP or SSH and consult your hosting documentation.

There are multiple solutions to try to make it work.

Updates

The first thing to do if you are stuck with WP Super Cache is to ensure that all your WordPress is up to date. You should check your :

  • WordPress
  • Plugins
  • Theme

Once all these updates are done, check back if these errors appear.

Check WP Super Cache

Sometimes, you just need to disable the plugin, and enable it just after to make it work again.

If it doesn’t work, your WP Super Cache plugin may be corrupted. To ensure that it’s not your case, you have to re-download the plugin (or the theme delivered with the plugin) and try to install it again.

Check others plugins

Are you sure that the error is related to WP Super Cache? Maybe not.

It could be related to another plugin that is not compatible. It could happen when you use a cache plugin, a security plugin, or simply a poorly developed plugin.

Disable all plugins. Then, check for your error, if the error is still there, the problem is not related to plugins compatibility. If there are no more errors, then enable every plugin one by one and check for the error. The goal is to target the plugin involved.

Try another theme

The error can be a problem with your theme.

If it’s not already done, then you should install & activate the default WordPress theme like Twenty Twenty-Two. Check for the error, and see what is happening to be sure that your WordPress theme is not the cause.

Permalinks & htaccess

If it doesn’t work, you may have a problem with your WordPress permalinks and/or your htaccess file. You should go on your WordPress dashboard, and re-saving permalinks from the permalinks page.

Contact the developer

If all these solutions don’t work, we advise you to contact the plugin developer.

You may have found a new bug, or a specific issue. You should get in touch with the developer either on the WordPress plugin forum, either by mail, either on their specific website with their own support.

Alternative solutions

If the developer doesn’t reply, or your problem is very urgent, then you should try an alternative to the plugin.

There are thousands of plugins on the official directory, and many others outside. You should try to find and test them!

If the issue is very specific, and the plugin could not be replaced, we advise you to contact an expert.
This is the best way to ensure you're not going to break your site anymore.