Guides

Hacked WordPress site or cPanel server? Start from the symptom.

Each guide starts from a symptom owners and server administrators actually search for, explains what is really happening, shows how to confirm it safely, and sets out what a complete fix requires. Server and hosting guides come first, because that is where the mechanisms a site cleanup misses usually live. Written from real incident work — free to read, with no email, form, or account.

Audience
Site owners, agencies, and server administrators investigating a symptom
Approach
Confirm safely, preserve evidence, fix the cause — not just the symptom
Access
Free to read — no email, form, or account
Author
G. Schad, WordPress and Linux security specialist

Triage

Who flagged you? Start from the message you received

Most incidents announce themselves through someone else: a browser, Google, your host, a scanner, a customer. Find the message or symptom closest to yours and start with the guide beside it.

Message or symptomWhat it usually meansStart here
Chrome shows “Deceptive site ahead” or “Dangerous site”Google Safe Browsing saw the site serve deceptive or harmful content to someone, often only under victim conditionsDeceptive site ahead warning
Google results say “This site may be hacked”, or show Japanese titles under your domainSpam pages or injected content were indexed under your domain, usually cloaked so you do not see themJapanese keyword hack
Your host suspended the account for malwareThe host’s scanner flagged files in the account; the notice lists damage, not how it got thereHost suspended the site for malware
ImunifyAV or cPanel reports infected filesFiles matched malware signatures; whatever wrote them may be somewhere the scan does not readImunifyAV found infected files
Several accounts on one WHM server are flaggedA server incident, not a set of unrelated site infectionsWHM or cPanel server hacked
You found defunct or defunct.dat in ~/.config/htopA gsocket backdoor: an encrypted outbound shell into the hosting accountgsocket backdoor (defunct.dat)
Files, dot-directories, or executables you cannot explain above public_htmlSomething was planted where WordPress scanners never lookHidden files in a Linux home directory
Deleted malware reappears on a schedule, or a cron job nobody recognisesA scheduled task is re-downloading or rebuilding what you removeMalicious cron jobs on cPanel and Linux
The host says the account is sending spam, or the server IP is on a blacklistA compromised mailbox, a malicious script, or an abused form is sending mailServer sending spam (Exim)
A .user.ini or auto_prepend_file line you did not writeCode that runs before WordPress and can rewrite files as fast as you delete themauto_prepend_file malware
Every scanner says clean, but a warning is still upA stale flag, cloaked delivery, or a mechanism outside what the scanner readsScan clean but still flagged
Visitors report a fake CAPTCHA or “verify you are human” stepThe site is serving a ClickFix lure to its visitorsFake verification page
Visitors are redirected to ads or scam pages, but you are notA cloaked redirect injection that targets search or mobile visitorsWordPress redirecting to spam
Customers report card fraud after buying from your storeThe checkout may be skimmed while every order still succeedsWooCommerce checkout skimming
An administrator account you never createdPersistence from an active compromise, not a glitchUnknown admin user in WordPress
The same infection returns after every cleanupSomething survived: a startup directive, a scheduled task, a credential, or a neighbouring siteWordPress keeps getting hacked
An insurer or client sent a security questionnaireYou need evidence for each control, not a yesCyber-insurance requirements
An advanced-cache.php, object-cache.php or db.php in wp-content that no installed plugin ownsA loader using a reserved drop-in name, which runs before every pluginDrop-in backdoors
Customers say checkout asked for their card twice, or showed an error and then a different card formA script injected a fake card form in front of the real gateway; the first entry went to the attackerFake payment form at checkout
A plugin folder nobody installed, a hello.php with extra code, or an active plugin missing from the listA backdoor packaged as a plugin and named to be overlookedFake WordPress plugins
View-source shows String.fromCharCode, document.write or an unknown <script src> in your pagesScript injected into the database: posts, widgets, or the siteurl and home optionsfromCharCode script injection
Google Ads disapproves ads for a “Compromised site” or malicious software, or suspends the accountGoogle’s checks found the landing pages compromised or serving harmful content; the site has to be clean before an appeal can succeedGoogle Ads compromised-site appeal
Search Console reports “Harmful downloads” or “Uncommon downloads”The site serves or links to files Safe Browsing considers malicious, unwanted, or too rarely seen to trust“Harmful downloads” in Search Console
RewriteCond lines on HTTP_REFERER or HTTP_USER_AGENT in .htaccess, or the same .htaccess in every folderMalicious rewrite or handler rules: cloaked redirects, a prepended loader, or a lockdown protecting a backdoor.htaccess malware rules
An unfamiliar hook in wp cron event list, or malware that returns every few minutes on a site with no server accessA scheduled WP-Cron event whose callback rewrites files or contentMalicious WP-Cron event
A PHP file in wp-content/mu-plugins that nobody installed, or a Must-Use tab you never noticedA loader that runs on every request without activation and survives a plugin cleanupRogue mu-plugins loader
Search Console emails “Social engineering content detected”Safe Browsing saw deceptive pages on the site — phishing, fake support, fake downloads or a fake verification prompt — and will warn visitors“Social engineering content detected”
Google shows “This site may be hacked” under your search resultGoogle indexed spam pages, injected links or altered content on the domain, often cloaked so only crawlers and searchers see it“This site may be hacked” label
An add_action on woocommerce_checkout_process, woocommerce_checkout_order_processed or woocommerce_payment_complete in a file you cannot placePHP running inside the order flow, able to read what customers submit and copy it elsewhereRogue WooCommerce checkout hooks
An @include with \x2f or \057 escapes at the top of index.php, wp-load.php or wp-config.phpA loader that runs a hidden payload — often a fake .ico or .png — on every requestObfuscated @include in core files
A database scan or query shows base64_decode, eval or gzinflate inside wp_optionsA payload stored in the options table, run by a loader file elsewherebase64_decode in wp_options
A subscriber, customer or custom role can reach Settings, Plugins or UsersThe role definitions in wp_user_roles or one user’s capabilities were alteredwp_user_roles tampered
Files named wp-vcd.php, wp-tmp.php or class.theme-modules.php, or ads on the site you never placedWP-VCD, brought in by a nulled theme or plugin and spread to the site’s other themesWP-VCD malware

Exact-match diagnostics

Database injections: options, roles, posts and cron

Exact-match diagnostics

Rogue files: core includes, drop-ins, mu-plugins and fake plugins

Files · WP-VCD

I Found wp-vcd.php or wp-tmp.php on My Site

WP-VCD arrives inside nulled themes and plugins, injects code into functions.php, writes companion files into wp-includes and spreads to every other theme. How to find each piece, why deleting the files is not enough, and why every nulled copy has to go.

  • WP-VCD
  • Nulled themes
  • functions.php
Read the WP-VCD guide

Exact-match diagnostics

Google, Search Console and Google Ads warnings

Exact-match diagnostics

WooCommerce checkout and payment compromises

Server and hosting forensics

Hacked cPanel or Linux server? WHM, gsocket, ImunifyAV and .user.ini guides

When the mechanism sits in the hosting account or the server rather than inside WordPress, a site cleanup removes the damage and leaves the cause. These guides cover the layer above the web root.

Server · Hidden files

I Found Files I Can’t Explain Above public_html

Backdoors that survive site cleanups live where WordPress scanners never look: dot-directories, executables, and SSH keys in the account’s home directory. How to sweep it read-only, tell the control panel’s own folders from planted ones, and what to preserve before removing anything.

  • Home directory
  • ELF binaries
  • authorized_keys
Read the hidden-files guide

WordPress site symptoms

Hacked WordPress site symptoms: redirects, spam pages, fake CAPTCHAs, rogue admins

What visitors, customers, and Google see when a WordPress site is compromised — and what each symptom usually means underneath.

Symptom · Repeat infection

My WordPress Site Keeps Getting Hacked

A site that is reinfected after every cleanup is not unlucky — something survived. The five places most cleanups never check, from database persistence and PHP startup directives to identities and neighboring sites.

  • Reinfection
  • Persistence
  • Entry path
Read the reinfection guide

Symptom · Unknown account

An Admin User I Never Created Appeared

Accounts do not create themselves. A rogue administrator is persistence from an active compromise — what to capture before deleting anything, how to find hidden siblings, and the response that closes the door.

  • Rogue admin
  • Persistence
  • Evidence
Read the rogue-admin guide

Assurance and comparisons

WordPress security audit checklist, cyber insurance, and “Is Wordfence enough?”

For the questions that come before an incident: how the site stands today, what an insurer or client will ask, and what a security plugin can and cannot tell you.

Assurance · Security plugins

Is Wordfence Enough to Keep My Site Secure?

A security plugin runs inside WordPress with the site’s own permissions. What Wordfence and similar plugins do well, the layers they cannot see — scheduled tasks, SSH keys, the process table, neighbouring accounts — and when an independent review is worth it.

  • Wordfence
  • Security plugins
  • Comparison
Read the Wordfence comparison

Deeper reading

WordPress and cPanel malware incident reports behind these guides

The guides draw on documented engagement work: a coordinated ClickFix infection investigated across more than 30 WordPress and WooCommerce sites, a hidden ELF backdoor found on a 261-account WHM server after every scan came back clean, and an e-commerce site whose reinfection cycle ended only when the surviving persistence and access paths were closed.

Common questions

Is my WordPress site hacked? Common questions

Is my WordPress site hacked?

Treat it as likely if any of these is true: visitors, customers, Google, or your host report something you cannot reproduce; an administrator account exists that nobody created; files, scheduled tasks, or PHP settings appear that nobody changed; or the site sends mail or redirects traffic it should not. Seeing nothing yourself proves little, because most infections hide from logged-in owners and direct visits. Start from the message or symptom in the table above, and confirm under the conditions the report describes before changing anything.

Can I clean a hacked WordPress site myself?

Sometimes, if you can do all of it: preserve evidence first, rebuild core, plugins, and themes from trusted sources instead of editing infected files, check the database, users, PHP startup files, and scheduled tasks, and rotate every credential from a clean device. Deleting the files a scanner lists is not a cleanup. If the infection returns, customer card data may be involved, or the indicators sit outside the site in the hosting account or on the server, the problem is larger than one site and is worth handing to someone who does this routinely.

Should I restore a backup after my site was hacked?

Not before you know when the compromise began and have preserved the current state as evidence. A backup taken after the intrusion restores the infection with it, and even a clean backup restores the same vulnerable software and the same stolen credentials. Restore only a backup you can show predates the compromise, then close the entry path, update everything, and rotate credentials before the site is public again.

My scanner says clean but Google or my host still flags the site — who is right?

Often both. A clean scan means the files that tool read did not match patterns it knows at the moment it read them. The flag may be stale after a real cleanup, the malware may be cloaked so it hides from you and from the scanner, the mechanism may sit outside what the scanner reads — the database, a PHP startup file, the home directory, a scheduled task — or the flag may concern something other than malware. Find out what the flagging party actually saw, and when, before requesting a review.

What does professional WordPress malware removal cost?

Typically $120–$500 for a single infected site, with most single-site cleanups completed in 1–3 business days. Multi-site fleets, missing hosting access, and repeat-reinfection investigations are scoped individually, and the written proposal states the exact fixed fee before work begins. The pricing page lists the ranges for every service, including server-level work.