Skip to content
Get help
Home/Blog/How to find WordPress malware beyond the obvious infected file

WordPress Recovery Guide

How to find WordPress malware beyond the obvious infected file

A practical WordPress malware investigation guide covering core integrity, plugins/themes, uploads, MU plugins, database payloads, administrators, cron and access logs.

Reviewed and updated 2026-09-06

Quick answer

Finding malware is a scoping exercise. Start with known-good comparisons and suspicious changes, then connect files, database records, users, scheduled tasks and requests into one incident timeline.

Start with known-good baselines

WordPress core and repository/vendor plugin packages give you trusted reference points. Compare rather than judging every PHP function by appearance; legitimate plugins can use code that looks suspicious in isolation.

Prioritize unexpected executable files

PHP files in uploads, cache, image or temporary directories deserve attention because those locations are commonly writable and often should not contain custom executable code.

Review MU plugins and early-loading code

wp-content/mu-plugins loads automatically and can be overlooked in ordinary plugin screens. Also review wp-config.php, active theme functions.php and early bootstrap files for unauthorized loaders.

Search the database for site-wide injections

Inspect relevant wp_options/autoloaded data, widgets, headers/footers and content for scripts or remote domains. Database malware can affect every page without changing a template file.

Review users and scheduled tasks

Unexpected administrators, application passwords and cron hooks can be both indicators and persistence mechanisms.

Use access logs to connect behavior to files

Direct requests to obscure PHP files, repeated exploitation of a plugin endpoint or suspicious admin-ajax actions can identify how malicious code is being used.

Avoid signature-only conclusions

base64, eval, shell functions and encoded data can be malicious, but context matters. False positives are common in minified, licensed or framework code. Verify against a trusted source and behavior.

If the site is currently redirecting visitors, serving malicious downloads, showing fake verification pages or affecting checkout, prioritize visitor safety and preserve evidence before aggressive cleanup.

Related WP•FIX resources

FAQ

What is the fastest place to look first?

Start with the visible symptom and recent changes, then compare core/plugins/themes and inspect unusual executable files and privileged users.

Can malware live only in the database?

Yes. Script injections, spam content and malicious options can drive harmful behavior without an obvious infected PHP file.

Are modified files always malicious?

No. Updates, customizations and caches change files legitimately. Compare content and change history rather than relying only on timestamps.

Can a checksum prove a site is clean?

No. Checksums are valuable for known packages, but they do not cover custom code, database payloads, users, scheduled tasks or hosting-level persistence.

Need help recovering a hacked WordPress site?

Send the URL, visible symptoms and any hosting or Google warning text.

Open an incident