How to Fix the 'advanced-cache.php Already Exists' Error in WordPress
Content
If you've tried to install, activate, or configure the WP Super Cache plugin, you may have encountered a frustrating and confusing error message about a file called advanced-cache.php. This is a common issue that can prevent the plugin from working correctly and sometimes even lock you out of your WordPress admin area.
This guide will explain what this file is, why this error occurs, and provide step-by-step solutions to resolve it.
What is the advanced-cache.php File?
The advanced-cache.php file is a special "drop-in" file used by WordPress itself. It's not part of a theme or a standard plugin. Its purpose is to allow caching plugins to integrate deeply with WordPress's core loading process for maximum performance.
Only one plugin can control this file at a time. When WP Super Cache is properly activated in "Expert Mode," it places its own version of this file in your wp-content directory. The error appears when the plugin detects a pre-existing advanced-cache.php file that it did not create itself.
Why Does the "Already Exists" Error Happen?
Based on community reports, this error typically occurs for a few key reasons:
- Another Caching Plugin: The most common cause is another caching plugin (e.g., WP Rocket, W3 Total Cache, WP Optimize, Cloudflare's plugin) that was either not uninstalled correctly or left the file behind.
- Incomplete Uninstallation: If WP Super Cache or another caching plugin was deleted without first being deactivated, it may not have had a chance to clean up its files, leaving
advanced-cache.phpbehind. - Your Web Host: Some hosting providers pre-install their own caching systems that use this file. The WP Super Cache plugin will refuse to overwrite a file created by your host to avoid breaking their optimized environment.
- A Zero-Byte File: In some cases, another plugin or system may leave behind an empty (0-byte)
advanced-cache.phpfile. WP Super Cache will still detect this and trigger the error.
Step-by-Step Troubleshooting Guide
Warning: Always back up your website before making changes to files.
Solution 1: Manually Delete the File via FTP/SFTP or File Manager
This is the most common and effective solution.
- Connect to your website's server using an FTP/SFTP client (like FileZilla) or your hosting provider's File Manager in cPanel.
- Navigate to the root folder of your WordPress installation.
- Open the
wp-contentfolder. - Look for the file named
advanced-cache.php. - Important: If you are currently using a different caching plugin successfully, do not delete this file, as it is required for that plugin to function. Instead, proceed to Solution 3.
- If you are not using any other caching plugin, right-click the file and delete it.
- Once the file is deleted, try activating or reconfiguring WP Super Cache again.
Pro Tip: Some FTP clients and file managers hide certain files by default. Ensure you have configured your client to "Show Hidden Files."
Solution 2: Check for and Remove Other Caching Plugins
If the file keeps reappearing after you delete it, it is likely being regenerated by another active plugin.
- In your WordPress dashboard, go to Plugins > Installed Plugins.
- Look for any other caching or optimization plugins (e.g., WP Rocket, W3 Total Cache, WP Optimize, LiteSpeed Cache, Cloudflare).
- If you find one, you must choose which caching plugin you want to use. You cannot run two plugins that use the
advanced-cache.phpfile at the same time. - To remove the conflicting plugin, deactivate it first, and then delete it. This should trigger its uninstallation process and remove its
advanced-cache.phpfile automatically. - After the other plugin is fully removed, delete the
advanced-cache.phpfile again if it remains, and then activate WP Super Cache.
Solution 3: For Host-Provided Caching (Advanced)
If you suspect your host created the file, deleting it might cause problems. Your best course of action is to:
- Contact your hosting provider's support.
- Ask them if the
advanced-cache.phpfile is part of their server configuration. - If it is, ask if it is safe to delete or disable it to use WP Super Cache instead. They will provide you with the correct steps for their specific environment.
Solution 4: Regain Admin Access (If Locked Out)
If the error message is preventing you from accessing your WordPress admin dashboard entirely, you can disable all plugins manually to regain access.
- Use FTP or File Manager to navigate to the
wp-contentfolder. - Rename the folder
pluginstoplugins.old. This will deactivate all plugins on your site. - You should now be able to log into your WordPress admin. Your site will look broken, but this is temporary.
- Once logged in, rename the
plugins.oldfolder back toplugins. - Go to the Plugins page and reactivate your plugins one-by-one, starting with WP Super Cache last. This should allow you to access its settings and resolve the conflict.
Summary
The "advanced-cache.php already exists" error is a safety feature, not a bug. The WP Super Cache plugin is designed to avoid overwriting a file that might be critical for another plugin or your hosting environment. By carefully identifying the source of the file and following the steps above, you can resolve the conflict and get your caching plugin working smoothly.
Related Support Threads Support
-
advanced-cache.php already existshttps://wordpress.org/support/topic/advanced-cache-php-already-exists/
-
Why did you leave files behind for me to clean up??https://wordpress.org/support/topic/why-did-you-leave-files-behind-for-me-to-clean-up/
-
Error after deactivating WP Super Cachehttps://wordpress.org/support/topic/error-after-deactivating-wp-super-cache/
-
Cannot locate file for manual deletionhttps://wordpress.org/support/topic/cannot-locate-file-for-manual-deletion/
-
Location of cache files?https://wordpress.org/support/topic/location-of-cache-files-2/
-
Delete WP super cachehttps://wordpress.org/support/topic/delete-wp-super-cache/
-
Files Could Not Be Deletedhttps://wordpress.org/support/topic/files-could-not-be-deleted/
-
wp_insert_posthttps://wordpress.org/support/topic/wp_insert_post-9/
-
advanced-cache.php already existshttps://wordpress.org/support/topic/advanced-cache-php-already-exists-2/
-
After I try Cloudflare Cache and I can’t use this plugin anymorehttps://wordpress.org/support/topic/after-i-try-cloudflarecache-and-i-uninstall-cloudflarecache/
-
Can not uninstall WP Super Cachehttps://wordpress.org/support/topic/can-not-uninstall-wp-super-cache/
-
Warning! You may not be allowed to use this plugin on your site.https://wordpress.org/support/topic/warning-you-may-not-be-allowed-to-use-this-plugin-on-your-site/
-
Problem setting up WP Super Cachehttps://wordpress.org/support/topic/problem-setting-up-wp-super-cache/
-
advanced-cache.php gets auto-created, please help me remove ithttps://wordpress.org/support/topic/advanced-cache-php-gets-auto-created-please-help-me-remove-it/
-
Some files created in Advanced Modehttps://wordpress.org/support/topic/some-files-created-in-advanced-mode/
-
advanced-cache.php was created by another pluginhttps://wordpress.org/support/topic/advanced-cache-php-was-created-by-another-plugin/
-
WP Super Cache, advanced-cache.php already existshttps://wordpress.org/support/topic/wp-super-cache-advanced-cache-php-already-exists/
-
Notice to activate ithttps://wordpress.org/support/topic/notice-to-activate-it/
-
message: plugin detected a bare directory index in your cache directoryhttps://wordpress.org/support/topic/message-plugin-detected-a-bare-directory-index-in-your-cache-directory/
-
[NSFW] Wp Super Cache-Warning! You may not be allowed to use this plugin on your site.https://wordpress.org/support/topic/wp-super-cache-warning-you-may-not-be-allowed-to-use-this-plugin-on-your-site/
-
WP Super Cache warninghttps://wordpress.org/support/topic/wp-super-cache-warning-3/
-
Passed as directory privacy on wp-admin and wp-includes foldershttps://wordpress.org/support/topic/passed-as-directory-privacy-on-wp-admin-and-wp-includes-folders/
-
WP SUPER CACHE created a stray “.php”https://wordpress.org/support/topic/wp-super-cache-created-a-stray-php/
-
wp super cache serious problemhttps://wordpress.org/support/topic/wp-super-cache-serious-problem/
-
Dropin advanced-cache.phphttps://wordpress.org/support/topic/dropin-advanced-cache-php/
-
Cannot log in to WP after deleting plugin /cookieshttps://wordpress.org/support/topic/cannot-log-in-to-wp-after-deleting-plugin-cookies/
-
wp_optionshttps://wordpress.org/support/topic/wp_options-5/
-
Deactivation caused cache and website errorhttps://wordpress.org/support/topic/deactivation-caused-cache-and-website-error/
-
ドロップインに advanced-cache.phpが表示されるhttps://wordpress.org/support/topic/%e3%83%89%e3%83%ad%e3%83%83%e3%83%97%e3%82%a4%e3%83%b3%e3%81%ab-advanced-cache-php%e3%81%8c%e8%a1%a8%e7%a4%ba%e3%81%95%e3%82%8c%e3%82%8b/
-
Stuck with advanced-cache.php error messagehttps://wordpress.org/support/topic/stuck-with-advanced-cache-php-error-message/
-
Prb in combination with CloudflareCache pluginhttps://wordpress.org/support/topic/prb-in-combination-with-cloudflarecache-plugin/
-
WP Cache Plugin Deletes itselfhttps://wordpress.org/support/topic/wp-cache-plugin-deletes-itself/
-
Cache issuehttps://wordpress.org/support/topic/cache-issue-40/
-
advanced-cache.phphttps://wordpress.org/support/topic/advanced-cache-php-2/
-
No me funciona el plugin WP Super Cachehttps://wordpress.org/support/topic/no-me-funciona-el-plugin-wp-super-cache/
-
Doesn’t work after uninstalling WP Rockethttps://wordpress.org/support/topic/doesnt-work-after-uninstalling-wp-rocket/