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.phpandwp-tmp.php(often inwp-includes) andclass.theme-modules.phpin the theme folder; - injects code at the top of
functions.phpin 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
- Back up the site as it is.
- Remove the nulled theme or plugin that brought it in. If you need it, buy a genuine license and install a fresh copy.
- 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. - Delete the dropped files:
wp-vcd.php,wp-tmp.php,class.theme-modules.php, and anything elsewp core verify-checksumsreports as “should not exist”. - Reinstall WordPress core:
wp core download --version=$(wp core version) --skip-content --force. - Remove hidden admin accounts: check
wp user list --role=administrator --skip-plugins --skip-themesand thewp_userstable. - Check other sites in the same hosting account.
- 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?.