WordPress Security ServicesMalware Removal
Suspicious Files

Is This File Malware? Suspicious WordPress Files and Scanner Detections Explained

A scanner flagged a file you've never heard of. Or you found something like wp-tmp.php, wp-vcd.php or class-wp-cache.php and you're not sure if it belongs. WordPress has hundreds of files, and attackers love to give theirs believable names. Here's how to tell real WordPress files from malware, plus a list of names I see most often.

Sergey By Sergey, WordPress security specialist Updated 3 min read
In this guide
  1. How to tell if a file belongs to WordPress
  2. File names that are usually malware
  3. Legitimate files that often get suspected
  4. Modified legitimate files
  5. Found malware? What next

How to tell if a file belongs to WordPress

You don’t need to memorize file names. These checks give you a reliable answer:

  1. Core files: compare with the official checksums. With SSH, wp core verify-checksums lists every core file that’s been changed, and every file in wp-admin, wp-includes or the root folder that “should not exist”. Anything extra there is almost certainly malware.
  2. WordPress.org plugins: compare too. wp plugin verify-checksums --all does the same for plugins from the official directory.
  3. Premium plugins and themes: compare with a fresh copy. Download the same version from the vendor and compare the folders (diff -r).
  4. Check the location. PHP files don’t belong in wp-content/uploads (except an index.php that only says “Silence is golden”). Files with image or icon extensions (.ico, .png) that contain PHP code are a classic disguise.
  5. Look inside. Malware usually has long encoded strings, eval(, base64_decode(, gzinflate(, str_rot13(, variable names like $O00O0O, or code that runs whatever arrives in a cookie or POST field.

File names that are usually malware

These are names I and other security researchers come across repeatedly on infected sites. A match doesn’t replace the checks above, but it’s a strong hint:

File What it usually is
wp-vcd.php, wp-tmp.php, class.theme-modules.php The WP-VCD malware family, usually from nulled (pirated) themes or plugins. See WP-VCD malware removal
wp-crons.php Not a WordPress file. The real file is wp-cron.php; the extra “s” is a disguise
class-wp-cache.php, wp-cache.php in odd places Fake “cache” files are a common backdoor disguise. Not part of WordPress core
wp-slave.php, wp-console.php, wp-res.php Not WordPress core files. Treat as backdoors unless a plugin you use clearly owns them
lang.php inside wp-content/languages/img/ Not a WordPress location for PHP. Commonly a backdoor
PHP files with random names (ks8dj2.php, x1z.php) in the root or uploads Almost always malware
.ico or image files containing PHP code, often loaded with @include A loader for malware, a well-known trick

Legitimate files that often get suspected

File What it is
wp-admin/admin-ajax.php A core WordPress file. Scanners and logs mention it because attacks target it, not because it’s malicious
wp-includes/sodium_compat/… (e.g. namespaced.php) Part of WordPress core (a cryptography library). Verify with checksums, but it belongs there
wp-includes/js/wp-emoji-release.min.js A core WordPress script for emoji support
wp-content/advanced-cache.php, object-cache.php Created by caching plugins. Legitimate if your cache plugin made them, but also a known hiding place, so check the content
.htaccess files in plugin, cache or backup folders Often added by legitimate plugins to protect their folders. Hundreds of identical copies in every folder, however, is malware (.htaccess malware)
Admin-ajax requests with _fs_blog_admin A parameter used by the Freemius framework that many plugins include. On its own, not malware

Modified legitimate files

The trickiest case is a real WordPress file that’s been changed, such as index.php, wp-config.php, wp-blog-header.php, wp-load.php, wp-settings.php or wp-includes/formatting.php with extra code at the top or bottom. The name is fine; the content isn’t. Checksums catch core files. For wp-config.php, which has no checksum, open it and compare with what a normal one looks like: mostly simple define(...) lines.

From my cleanup work: the files that fool owners most are the ones with the most boring names. Nobody questions wp-includes/class-wp-cache.php or a .ico file in the theme folder. Which is exactly why attackers use them. When in doubt, the checksum command and a comparison with a clean copy are faster and more reliable than any list of names.

Found malware? What next

Deleting one file rarely ends an infection. There are usually backdoors elsewhere and a way in that’s still open. Follow my step-by-step guide to fixing a hacked WordPress site, or send me the file name and location and I’ll tell you what it is.

Sergey, WordPress Security Specialist
About the author
Sergey, WordPress Security Specialist

10 years in WordPress security and incident investigation, and more than 200 websites cleaned of malware. Top Rated on Upwork with a 100% Job Success score. More about me

Frequently Asked Questions

Can I just delete a file my scanner flags?

Not without checking it first. Scanners make mistakes in both directions, and deleting a legitimate file can break your site. Back up the site, look at the file, compare it with the original, and replace rather than delete when the file belongs to WordPress, a plugin or your theme.

Is a file in wp-includes always safe?

No. Attackers deliberately hide files in wp-includes and wp-admin because owners assume everything there is part of WordPress. wp core verify-checksums tells you instantly which files there don't belong.

What does a detection name like "PHP/WordPress.Infected" or "Backdoor:PHP" mean?

It's the scanner vendor's label for the type of malware it matched. The exact wording differs per vendor, so the name itself matters less than where the file is and what's in it. Treat any backdoor detection as serious.

The file comes back after I delete it. Why?

Something is recreating it: another backdoor, a scheduled task, code in the database, or another infected site in the same hosting account. See my page on why WordPress malware keeps coming back.

Need a hand?

Let me clean your WordPress site for you

Send me your site URL and what you're seeing. I'll reply with what I think is going on and the next step.

$95 per infected site · 1-month guarantee · direct contact with the specialist

Get My Site Cleaned →