A suspicious wp-content/advanced-cache.php file can run before ordinary WordPress plugins. Deleting visible cache files is therefore not enough. Preserve the file, identify its owner, control the early-loading path, and prove that a trusted replacement remains stable.
The filename alone does not prove malware. Page-cache plugins and managed hosts may install a legitimate drop-in, while an abandoned or modified copy can survive configuration changes. Treat it as an ownership and integrity question.
I’m Ryohei Yokoyama, founder of SiteFixNow. With over 20 years of IT engineering experience and practical WordPress recovery work, I focus on preserving evidence and tracing the process that can recreate an early-loading file.
- Why
advanced-cache.phpcan run before normal plugins. - How to compare it with a trusted plugin or hosting source without executing it.
- How to contain, restore, and monitor the drop-in safely.
WordPress advanced-cache.php Loads Before Ordinary Plugins
Confirm the active content directory and WP_CACHE state before changing the file.
During bootstrap, WordPress can look for advanced-cache.php under WP_CONTENT_DIR and include it before normal plugins. That timing explains why disabling a plugin in the dashboard may not immediately remove the early code path.
The content directory is commonly wp-content, but it can be moved. Confirm the installation root, any WP_CONTENT_DIR definition, and the web request that reaches that installation. Do not assume the first WordPress-looking folder is production.
WP_CACHE is a loading switch, not a malware verdict. Setting it to false may stop this include while leaving a malicious writer, must-use plugin, scheduled task, or server rule untouched. This issue is also distinct from object-cache.php, which serves a different caching role.
WordPress advanced-cache.php Evidence Must Be Preserved First
Record the path, timestamps, hash, permissions, and a protected copy before cleanup changes the evidence.
Copy the file outside the public web root with restrictive permissions. Record its absolute path, owner, group, size, modification time, and SHA-256 hash. Timestamps are clues, not proof; the hash provides a stable comparison point.
Use read-only commands only after confirming the path. Do not execute the PHP file or copy unrelated configuration secrets into a ticket. Preserve relevant web, PHP, deployment, plugin-update, and file-change logs before rotation removes them.
stat /srv/example/public/wp-content/advanced-cache.php
shasum -a 256 /srv/example/public/wp-content/advanced-cache.php
cp -p /srv/example/public/wp-content/advanced-cache.php /srv/example/incident/advanced-cache.php.suspectInspect advanced-cache.php Without Executing Suspicious PHP
Compare static contents and the exact owner package before allowing WordPress to load the suspect file.
Identify the claimed owner from plugin records, deployments, and hosting support. Obtain the same trusted release from the official vendor and compare hashes or a unified diff. Comparing only with the newest release can create false differences when production intentionally runs an older version.
WP-CLI can list recognized drop-ins, but bootstrapping a compromised site may load the suspect file first. Static comparison is safer initially. If wp-config.php also contains suspicious code, use the separate wp-config.php cleanup workflow and preserve that evidence independently.
shasum -a 256 /srv/example/incident/advanced-cache.php.suspect \
/srv/example/trusted-package/advanced-cache.php
diff -u /srv/example/trusted-package/advanced-cache.php \
/srv/example/incident/advanced-cache.php.suspectContain advanced-cache.php Through Its Real Loading Controls
Use a maintenance window and the owner’s procedure; do not delete cache directories or edit configuration blindly.
Follow the plugin or host’s deactivation procedure. Containment may include disabling page caching, changing WP_CACHE through a protected configuration edit, and moving the suspect file to the incident directory. Never leave an executable backup such as advanced-cache.php.old in the public content directory.
Back up wp-config.php and preserve unrelated constants and custom paths. Then test anonymous pages, administration, forms, checkout or membership flows, and an authorized origin route. If isolation breaks the site, restore availability from the protected copy without discarding the evidence.

Restore advanced-cache.php From a Trusted Owner
Regenerate the drop-in from its exact authorized component only after isolating the suspect copy.
If caching is still required, reinstall the matching plugin release from its official distribution or ask the managed host to regenerate the file. Do not copy a drop-in from another website; generated paths, constants, hosting APIs, and versions can differ.
Clear only the required cache layers and verify new responses. Broad deletion can erase evidence and create load spikes. The infected cache cleanup guide explains why purging cached output is not the same as removing its writer.
Find What Created advanced-cache.php and Verify It Stays Clean
Trace any recurrence to a process, account, deployment, or plugin action before closing the incident.
A returning file may be regenerated legitimately by an active cache component, or rewritten by a compromised administrator, hosting account, deployment key, cron task, plugin, or backdoor. Recurrence proves that a writer exists; logs and known operator actions identify which one.
Review privileged users, hosting and SFTP accounts, deployment tokens, scheduled tasks, must-use plugins, ordinary plugins, and recently changed PHP. If the cache plugin folder is modified, use the infected plugin folder cleanup process instead of repairing one drop-in alone.
Monitor the path from outside the same application where possible. Record hashes and times without emailing file contents or secrets. If unexplained files or redirects return, follow the WordPress reinfection root-cause investigation rather than repeatedly rotating one cache file.
WordPress advanced-cache.php Malware: Frequently Asked Questions
The filename is only a lead; ownership, loading conditions, and recurrence determine the response.
WordPress advanced-cache.php Recovery Requires Ownership and Recurrence Proof
Preserve, attribute, isolate, restore, and monitor the exact early-loading file.
The key question is not simply whether advanced-cache.php exists. Determine why WordPress loads that file, whether it matches an authorized component, what can recreate it, and whether the restored site remains stable across cache layers. If that chain cannot be established safely, pause further edits and obtain incident-response help.
If You Can’t Secure or Recover Your WordPress Site Yourself
Ask for help when the drop-in owner or its recreating process cannot be verified safely.

If your website shows malware warnings, redirects to strange pages, or you are not sure whether it is secure,
SiteFixNow can help clean, repair, and recover your WordPress site.
- Your WordPress site may be infected with malware.
- Security warnings appear in Google or browser results.
- You found unknown admin users or suspicious files.
- The site redirects to spam or unknown websites.
- You need urgent WordPress hacked site repair.
- Reduce visitor risk and SEO damage.
- Find hidden malware and backdoors, not only visible symptoms.
- Recover the site safely without unnecessary data loss.
