Hacked WordPress sites: from a small code flaw to crypto mining and SEO spam
After a takeover, attackers use your site for crypto mining, SEO spam or redirects. How the attack chain works and how to recognise a hijacked WordPress site.

Your website still looks the same, but suddenly gambling offers appear under your address on Google. Or the server constantly runs at full load although almost nobody visits the site. Both can point to a hacked WordPress installation.
After taking over a site, attackers use it for their own purposes: they mine cryptocurrency, inject ad spam or redirect visitors to fraudulent offers. In July 2026, the attack chain “wp2shell” showed that even the WordPress core itself can become the entry point. Often, attacks come through plugins and themes.
How does a security vulnerability become a permanently hijacked site? And how do you notice that something is wrong?
The attack chain: one flaw, many consequences
Patchstack recorded a total of 11,334 new vulnerabilities in the WordPress ecosystem for 2025 – 42 percent more than the year before. The figure covers different severity levels; not every one of these flaws allows a full takeover. Patchstack: State of WordPress Security 2026 · Wordfence 2024 Annual Report
Many takeovers follow the same pattern:
- Attackers use an unpatched flaw in the WordPress core, a plugin or a theme. Depending on the vulnerability, a single manipulated request without any login is enough.
- They plant a web shell – a PHP file they can use to execute commands remotely. It can sit in the uploads folder or disguise itself as a plugin.
- Additional backdoors secure their access. If one of them remains undiscovered during cleanup, it can reload remote malicious code at any time.
- The compromised site is used for mining, spam, redirects or further attacks.
How attackers get in
An example from July 2026 is “wp2shell”. It combines two vulnerabilities in the WordPress core that together allow attackers to obtain admin access without a username or password and to execute code on the server. Affected were WordPress versions 6.9.0 to 6.9.4 and 7.0.0 to 7.0.1; the patch arrived in mid-July 2026. Shortly after publication, the flaw was already being exploited in the wild – mass scans by bots followed within days. Wiz Research · Elastic Security Labs
Widely used plugins can open such doors too. W3 Total Cache had critical vulnerabilities disclosed in 2025 and 2026; Everest Forms had one in 2025 that allowed unauthorised attackers to upload files. The technical details are in the accompanying admin article.
What attackers do with your site
1. Crypto mining: your server mines for others
An injected miner uses your server’s processing power to mine cryptocurrency. The revenue goes to the attackers while your website becomes slower. In the cases described here, Monero (XMR) is used.
Group-IB described a Monero mining campaign observed since May 2026 on Linux systems: the miner was a heavily modified program that deleted itself from disk after starting, ran only in memory and pretended to be harmless process names such as ssh. A pure file scan can miss such a process. Additional mechanisms ensured the miner was started again. The report describes a Linux campaign, not a proven WordPress entry point. Group-IB, 07/2026
On WordPress servers this often runs through the vulnerability just found: a Sucuri case from 2022 shows the typical flow – attackers load a script onto the server that downloads and unpacks the miner, and set up a scheduler (cron job) that reinstalls the miner after any removal attempt. Sucuri, 07/2022
A possible sign is permanently high server load despite few visitors. The site becomes slower; depending on the hosting, extra costs may arise. High load alone, however, does not prove an attack.
2. SEO cloaking: Google sees something different from you

With SEO cloaking, the server delivers different content to search engines and normal visitors. While you see your own, unchanged page, the Google crawler sees ad spam, gambling links or fake forums. That is exactly why such a takeover stays unnoticed for so long. Google officially classifies cloaking as spam – and explicitly points out that hackers use it so that site owners do not notice the hack. Google: Spam Policies · Google web.dev: Cloaked keywords hack
Two cases show how attackers exploit both search engines and visitors:
- In January 2026, Sucuri documented a cloaking case on a website: visitors saw a completely normal page. On Google, however, the site’s results were flooded with fake eBay pages and “Situs Toto” gambling spam. The reason: a malicious addition inside a PHP file recognised search engine crawlers by their user agent, loaded spam content from a remote server and showed it specifically to those crawlers. Sucuri, 01/2026
- In DollyWay, a campaign connected to VexTrio, redirects are the main focus instead. According to GoDaddy it uses more than 20,000 hijacked WordPress sites worldwide and produced around ten million page views with injected malicious code per month in early 2025. Visitors are led through redirect chains to scam, crypto and dating sites. Especially nasty: the malicious code is re-injected on almost every page view – the infection thus repairs itself permanently. GoDaddy/Dark Reading, 03/2025
Watch out for foreign hits under your domain, inexplicable ranking drops and “compromised content” messages in the Google Search Console.
3. Redirects and malware: your visitors become the target
Some hijacked sites are only a staging point themselves: they lead visitors directly to installing malware. The SocGholish malware family shows a fake “browser update” on hacked sites; anyone who clicks installs malware. Check Point, 03/2024
How current and professional this business is was shown in August 2026 by Check Point Research with the “StopAndProtect” operation: the operators of thousands of hacked WordPress sites presented visitors with a fake CAPTCHA. The deception copied a PowerShell command to the clipboard and asked visitors to run it themselves. Only this further step started the infection chain. Depending on what the attackers selected, ransomware, data-stealing programs or screen locks followed. The hijacked sites also served as command-and-control centres and storage for the stolen data. Check Point Research, 08/2026
Often the first hint comes from visitors: they land on foreign pages or see unexpected “verification” or “browser update” prompts.
4. Botnets: hijacked sites become infrastructure
Hacked WordPress sites are often not the actual goal but building blocks in large criminal networks – as redirect nodes, command centres or storage for stolen data.
The already mentioned StopAndProtect operation from 2026 shows this: Check Point Research found the attackers’ internal logs with around 2,000 compromised WordPress domains and more than 6,000 affected IP addresses from many countries. One examined site was still running a WordPress version from 2021; the scan found almost 40 security problems in that installation. Check Point Research, 08/2026
Why you rarely notice it
A normal homepage says little about what is happening in the background:
- With selective delivery, only certain visitors or search engines see the malicious content. Your own request can look completely normal.
- Backdoors can sit in the
mu-pluginsdirectory. WordPress loads these plugins automatically. In the backend they have their own “Must-Use” view and cannot be deactivated there like normal plugins. WordPress Documentation Sucuri, 07/2025 - Some malicious programs copy themselves into several directories and create their own admin accounts. If you only remove one visible file, further access points remain. Wordfence, 09/2026
A case from 2026 shows how far this can go: on a WordPress site, an infected wp-config.php returned after every cleanup – because the actual backdoors lay outside the web root, for example next to the webmail installation. Wordfence, 05/2026
What you can do

As a site owner you should keep WordPress, plugins and themes up to date and remove extensions you no longer need. Secure admin accounts with strong, unique passwords and two-factor authentication. Regular backups and a look at “Security Issues” in the Google Search Console are also part of it.
If you suspect a compromise, it is worth checking access logs and unknown admin accounts. A cleanup must also cover hidden backdoors, otherwise the malicious code can return. If you cannot reliably find the root cause, get help with the investigation and the rebuild.
As a visitor, be wary of unexpected downloads, redirects and alleged browser updates. Close the tab and, if possible, inform the site operator. Especially unambiguous is a “verification” that asks you to run a command in PowerShell or another system window: do not follow this request. Keep the browser and its protection features up to date.
Conclusion
A hacked site can look normal for a long time. Redirects, foreign search hits or permanently high server load are therefore reasons to take a closer look. After a takeover it is not enough to delete the visible spam: the entry point and any remaining access must also be removed.
Editorial status: 7 November 2026. Sources are linked directly with each case. For detailed technical steps and detection guidance for admins, see the accompanying technical article.