WordPress Security ServicesMalware Removal
Malware Family

WP-VCD Malware: How to Remove wp-vcd.php, wp-tmp.php and the Nulled Theme Backdoor

WP-VCD is one of the best-known WordPress malware families, and it's still around. If you've found wp-vcd.php, wp-tmp.php or class.theme-modules.php on your site, here's what it is, how it got there, and how to remove it without it coming straight back.

Sergey By Sergey, WordPress security specialist Updated 2 min read
In this guide
  1. What WP-VCD does
  2. How to remove WP-VCD
  3. Avoiding it next time

What WP-VCD does

WP-VCD spreads through nulled themes and plugins, pirated copies of premium products shared for free (more on why nulled plugins are so risky). Once activated, it typically:

  • creates files such as wp-vcd.php and wp-tmp.php (often in wp-includes) and class.theme-modules.php in the theme folder;
  • injects code at the top of functions.php in your theme, and often in every other theme it can reach;
  • creates a hidden administrator account so the attacker can log in;
  • inserts spam or ads into your pages, and contacts a remote server for instructions.

The injected code checks on every page load whether its files still exist, and recreates them if they don’t. That’s why deleting them alone never works.

How to remove WP-VCD

  1. Back up the site as it is.
  2. Remove the nulled theme or plugin that brought it in. If you need it, buy a genuine license and install a fresh copy.
  3. Clean every theme’s functions.php, including inactive themes. Compare with a fresh copy from the theme’s official source. The injected block is usually at the very top, before the theme’s own code. Delete themes you don’t use.
  4. Delete the dropped files: wp-vcd.php, wp-tmp.php, class.theme-modules.php, and anything else wp core verify-checksums reports as “should not exist”.
  5. Reinstall WordPress core: wp core download --version=$(wp core version) --skip-content --force.
  6. Remove hidden admin accounts: check wp user list --role=administrator --skip-plugins --skip-themes and the wp_users table.
  7. Check other sites in the same hosting account.
  8. Change all passwords and end all sessions (wp config shuffle-salts).

Then follow the rest of my step-by-step guide to fixing a hacked WordPress site to check the database and server for anything else.

From my cleanup work: with WP-VCD, the clue is almost always in the theme folder: a premium theme the owner “got from a friend” or a download site. Every other theme on the server had the same block of code at the top of its functions.php. Removing the files took minutes; cleaning all the themes and buying a genuine copy of the one they needed is what made the cleanup stick.

Avoiding it next time

Only install themes and plugins from WordPress.org or the official vendor. “Free” premium themes are the single most reliable way to get a backdoor. More on spotting suspicious files in Is this file malware?.

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

How did WP-VCD get onto my site?

Almost always through a nulled (pirated) premium theme or plugin. The people who distribute them add the malware before sharing. Installing the theme activates the infection.

I deleted wp-vcd.php but it came back. Why?

WP-VCD injects its loader into the functions.php file of your themes. As long as that code is there, it recreates its files on the next page load. You have to clean every theme, not just delete the visible files.

Does WP-VCD affect other sites on my server?

It can. It's designed to spread to other themes, and other WordPress sites the same hosting account can reach. Check every site in the account.

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 →