Starter Offer: WordPress Malware Cleanup From $89 Claim on WhatsApp →

WordPress Malware Removal

Professional cleaning and security hardening for just

My Client’s WordPress Site Was Showing a Stranger’s Webpage — While 967 Hidden Casino Posts Were Sent to Google

MD Pabel May 7, 2026
AI Summary
WordPress Site Showing Wrong Page + Hidden Casino Posts Fixed

Quick Answer: If your WordPress site is showing a completely different webpage to visitors — while your own admin area and post counts look normal — you are likely dealing with a cloaking attack where index.php has been replaced with a user-agent router. Googlebot gets served a hidden spam page (usually casino or gambling content), while real visitors see a fake landing page the attacker controls. At the same time, a malware-injected functions.php hides hundreds of spam posts from the admin panel — posts that still register in the “All (X)” counter but disappear from the post list. This case shows the full investigation and exact removal steps.

The Client’s Complaint: “My Site Is Showing Someone Else’s Website”

The client reached out saying they could not find their own website. When they typed their domain into a browser, they did not land on their site — they landed on a polished, unfamiliar landing page that read “Welcome / Hoş Geldin” in Turkish, with a “🚀 System Active” badge and two buttons labeled “Discover” and “Communication.”

This was not a redirect. The URL was correct. The domain was theirs. The site was just gone — replaced entirely by content they had never created.


Client's WordPress site showing an unknown Turkish-language 'Welcome / Hoş Geldin' landing page instead of their actual website — a complete homepage replacement caused by a cloaking malware attack
The client’s domain was serving a full Turkish-language “Welcome” page — a fake site built by the attacker, not a redirect. The URL was correct but the content was entirely replaced.

The client shared their WordPress admin credentials and access to their Strato.nl hosting control panel. I started in the hosting file manager — not in WordPress — because the attack had reached below the WordPress layer.

What I found was not one problem. It was four separate attack layers, each designed to survive the removal of the others.

Finding Layer 1: The Replaced index.php and the Googlebot Cloaking

The first place I check on any hacked site is the root index.php. WordPress’s legitimate root index.php is a single-line file under 30 bytes — it bootstraps the WordPress load sequence and nothing else. Any file significantly larger than that is a red flag.

What I Saw in the Strato.nl File Manager

Inside the Strato.nl webspace file manager, the root index.php was showing as 4.64 KB — over 150 times larger than a clean WordPress index.php — with a modification timestamp of 04-05-2026 at 13:39, a date the client confirmed they had not touched the file.


Strato.nl hosting file manager showing index.php at 4.64 KB — far larger than the legitimate WordPress root index.php — with a recent modification date of 04-05-2026
The Strato.nl file manager revealed it immediately: index.php is 4.64 KB, modified on 04-05-2026. A clean WordPress root index.php is under 30 bytes and was installed in April 2026 alongside other untouched core files.

Opening the file in Strato’s built-in code editor confirmed the compromise.


The malicious index.php open in Strato's file editor, showing a PHP array of Googlebot user-agent strings used for cloaking — the malware serves different content to search engine crawlers vs regular visitors
The malicious index.php in Strato’s editor. Lines 7–22 build an array of every known Googlebot variant for user-agent detection — the foundation of the cloaking attack.

How the Cloaking Logic Worked

The malicious index.php was a traffic router. On every page request, it read the visitor’s user-agent string and made a decision:

  • If the visitor is Googlebot (or any Google crawler): serve the contents of amp.php — a 22.53 KB file packed with Dutch-language casino spam, designed to be indexed by Google under the client’s domain.
  • If the visitor is a real human: display the fake Turkish “Welcome” page embedded directly in the HTML of index.php itself — bypassing WordPress entirely.

This explains why the client saw the wrong page when they visited their own site. Everyone did. The only entity seeing casino content was Google — and Google was indexing it.

This is the reverse of the most common cloaking pattern. Usually, malware hides spam from the site owner and shows it to Google. Here, the fake landing page was shown to humans, while Googlebot received a dedicated spam payload via amp.php. The client had no way to notice the Google-side infection without checking Search Console.

Fixing Layer 1

I uploaded a fresh WordPress 6.9.4 zip directly to the Strato.nl file manager and unpacked it over the existing installation to overwrite every infected core file, including index.php and amp.php.


Strato.nl file manager showing a wordpress-6.9.4.zip being unpacked to replace all infected WordPress core files including the malicious index.php
Uploading fresh WordPress 6.9.4 core files to Strato and unpacking directly over the existing install — this overwrites the malicious index.php and amp.php with clean originals.

The fake welcome page was gone. The site was loading again. But this was only the surface layer. Something had replaced index.php in the first place — and unless that mechanism was removed, the file would be replaced again.

Finding Layer 2: The Self-Healing Malware System

I navigated to wp-content and immediately found three components that had no business being there.

Component A — sc-loader.php in mu-plugins

Inside wp-content/mu-plugins/ there was one file: sc-loader.php.


Strato.nl file manager showing the wp-content/mu-plugins/ directory containing only one file: sc-loader.php, placed there by the attacker as part of the System Control persistence mechanism
wp-content/mu-plugins/ contained exactly one file: sc-loader.php. The mu-plugins directory auto-loads any PHP file without requiring activation — making it a favorite hiding spot for persistent malware.

The WordPress mu-plugins directory (Must-Use Plugins) auto-executes any PHP file it contains on every single page load — without any dashboard activation, and without appearing in the standard Plugins list. Anything placed here runs silently and invisibly to a normal WordPress admin.

Opening sc-loader.php showed exactly what it did:


The sc-loader.php code open in Strato's editor. The plugin header reads 'Plugin Name: SC Loader — System Control auto-loader and integrity guard.' The code checks for the system-control plugin and restores it from .sc-backup if missing.
sc-loader.php describes itself openly in its own header: “System Control auto-loader and integrity guard.” It checks whether the system-control plugin is present on every page load and restores it from the .sc-backup folder if it detects it has been deleted.

The header comment says exactly what it does: “System Control auto-loader and integrity guard.” On every WordPress page load, it checks whether the system-control plugin exists. If it has been deleted, sc-loader.php copies it back from a backup location and activates it again — automatically, silently, instantly.

Component B — The Hidden .sc-backup Folder

In wp-content/, there was a hidden folder named .sc-backup. The leading dot keeps it invisible in most file managers unless “show hidden files” is enabled.


The Strato.nl file manager showing wp-content/ with the hidden .sc-backup folder visible alongside the standard mu-plugins, plugins, and themes directories
The wp-content directory reveals the hidden .sc-backup folder — only visible because the file manager is set to show hidden files. Most basic security audits miss this entirely.

Inside .sc-backup was a complete backup copy of the System Control plugin.


Inside the .sc-backup folder: a system-control subfolder and a .version file — a full offline backup of the malicious plugin kept ready to restore if the main plugin is deleted
Inside .sc-backup: the system-control plugin backup and a .version tracking file. This is the source that sc-loader.php copies from whenever the live plugin is removed.

Component C — The system-control Plugin in wp-content/plugins

The System Control plugin itself lived in wp-content/plugins/system-control.


The wp-content/plugins/ directory in Strato's file manager showing the system-control plugin folder — the main malicious plugin protected and restored by sc-loader.php
The system-control plugin in wp-content/plugins/ — this is the payload delivery component. It handles injecting the malicious index.php, managing spam posts, and creating ghost admin accounts.

Why the Three Components Keep Each Other Alive

When I deleted mu-plugins/sc-loader.php, it reappeared within seconds. When I deleted .sc-backup, it also regenerated. When I deleted plugins/system-control, it was restored immediately.

Each component protects the other two:

If You Delete… It Comes Back Because…
mu-plugins/sc-loader.php The running system-control plugin recreates it on the next page request
.sc-backup The system-control plugin writes the backup folder again from its own code
plugins/system-control sc-loader.php detects it missing and copies it back from .sc-backup

The only working solution is to remove all three simultaneously, faster than any WordPress page request can fire. Via SSH or a file manager that supports multi-select:

rm -rf wp-content/.sc-backup wp-content/mu-plugins wp-content/plugins/system-control

After running this as a single atomic command, none of the three components returned. The self-healing loop was broken.

Important note: In my specific case, the mu-plugins directory contained only malicious files, so I removed the entire folder safely. If your site uses legitimate must-use plugins, do not delete the whole mu-plugins directory. Instead, remove only the malicious loader file:

wp-content/mu-plugins/sc-loader.php

Note: If the existing case study at regenerating WordPress malware — system control helped you understand the persistence mechanism, this case is the same malware family with two additional attack layers that were not present in that earlier case.

Finding Layer 3: Ghost Administrator Accounts

With the files cleaned and fresh core in place, I ran a full Wordfence scan to catch anything remaining.


Wordfence scan results showing 84 findings after removing the System Control malware components — including a critical flag on wp-includes/hash_files.php, a file that does not belong in a clean WordPress installation
Wordfence found 84 issues after the file-level cleanup — including a critical flag on wp-includes/hash_files.php, which has no business being in a clean WordPress install. I worked through every flagged result against official WordPress 6.9.4 checksums.

After working through the Wordfence results, I opened the Users panel and found multiple administrator accounts the client had never created — all named “web panel”, all marked Inactive, all with zero posts attached.


The WordPress Users admin panel showing five 'web panel' ghost administrator accounts — all inactive with no posts, none recognized by the legitimate site owner — created by the system-control malware as persistence accounts
Five ghost admin accounts, all named “web panel,” all marked Inactive. These were created by the System Control plugin to give the attacker persistent re-entry points even if the main credentials were changed.

Ghost admin accounts serve two purposes: they give the attacker a re-entry route if the legitimate admin changes their password, and they act as the post author IDs used by the malware to create spam posts — which feeds directly into Layer 4.

I deleted every unrecognized account and forced a complete password reset on all remaining admin users. See how to find and remove hidden admin users in WordPress for a full walkthrough of this process.

Finding Layer 4: Casino Posts Hidden by an Infected functions.php

This was the layer that confused the client most — and the one I have not seen documented in this exact form anywhere else.

After the file cleanup and account removal, I went to check Posts in wp-admin. The interface showed a contradiction that made no logical sense at first glance:

The “All” counter showed (11). The post list showed “No messages found.”

WordPress Says 11 Posts Exist, But Shows Zero


The WordPress posts panel showing All (11) in the counter tab but 'No messages found' in the post list — a functions.php malware injection is filtering posts out of the admin view while keeping them counted
“All (11)” — but the list is empty. This is not a WordPress bug. A malware-injected functions.php is filtering the post query to exclude all posts authored by the ghost “web panel” accounts, while still counting them in the total.

The post count and the post list disagreed. In a healthy WordPress installation, that cannot happen through normal settings. Something was intercepting the database query that populates the list — but not the query that counts total posts.

The answer was inside the theme’s functions.php.

The Malware Inside functions.php


The Avada theme's functions.php open in WP File Manager (WP Bestandsbeheer), highlighted in blue. The file is 25 KB and was last modified May 1, 2026 — long after the theme's original install. A backup file functions.php_bak and suspicious functions.txt are also visible.
functions.php for the Avada theme, open in WP File Manager. File size: 25 KB. Last modified: May 1, 2026 — not by the client. A clean Avada functions.php is a fraction of this size. The .php_bak backup and functions.txt are also attacker artifacts.

The theme’s functions.php had been injected with over 800 lines of malicious PHP at the top of the file — but the injection used function names that looked like legitimate WordPress internals: get_sidebar_double(), is_singular_cookie(), get_template_part_compiler(). These names follow WordPress naming conventions closely enough to slip past a casual review.

The injected code used two WordPress hooks to suppress the spam posts:

1. The post list filter: A posts_where hook added a AND post_author NOT IN (...) clause to the database query that builds the admin post list — excluding every post authored by the ghost “web panel” accounts. This made the list show zero results.

2. The count rewriter: A views_edit-post hook intercepted the count numbers displayed in the tab links (“All,” “Published,” “Draft”) and rewrote them using a separate WP_Query — which included the hidden posts in its count, creating the “All(11) but no posts” display inconsistency.

The pre_get_posts hook also limited public-facing queries to posts by the ghost accounts only — meaning the casino spam content was served on the front end while the legitimate 11 client posts were hidden from visitors.

Removing the injected block from functions.php and saving the clean file was all it took. The posts list normalized immediately.

After Cleaning functions.php — The Spam Is Revealed


The WordPress posts panel after removing the malicious functions.php injection — the count jumps from All(11) to All(978), revealing nearly 1,000 spam posts that the malware had been hiding from the admin view
After cleaning functions.php: the post count jumps from “All(11)” to All(978). The malware had been hiding 967 spam posts from the admin panel while still counting them in the total — a number the client had never noticed because it appeared under their own post count.

The connection between all four layers became clear: the ghost admin accounts authored the spam posts → the functions.php malware hid those posts from the admin → the system-control plugin maintained everything and kept it alive → the index.php cloaking sent the spam posts (via amp.php) to Google while showing humans the fake Turkish landing page.

All 967 spam posts were bulk-deleted after confirming the client’s 11 legitimate posts were separate.

The Removal Order That Actually Works

Order matters. If you clean in the wrong sequence, the surviving components re-inject what you just removed.

  1. Start at the hosting file manager, not WordPress admin. Going into wp-admin first triggers page loads that allow sc-loader.php to restore deleted components.
  2. Replace all WordPress core files with a fresh download matching your installed version. Use Strato’s file manager, cPanel File Manager, or SFTP. This fixes index.php and all other modified core files.
  3. Remove all three System Control components simultaneously:
    rm -rf wp-content/.sc-backup wp-content/mu-plugins wp-content/plugins/system-control

    Do this as a single command. Deleting one at a time gives the others time to restore. Important note: In my case, the mu-plugins directory contained only malicious files, so deleting the entire folder was safe. If your site uses legitimate must-use plugins, do not remove the whole mu-plugins directory.

  4. Delete amp.php and any unexpected PHP files in the document root that don’t belong to a clean WordPress install.
  5. Run a full Wordfence scan and work through every flagged result against official WordPress checksums.
  6. Audit Users → delete every unrecognized admin account → force password reset on all remaining accounts.
  7. Inspect functions.php in the active theme. Compare the file size and modification date against the original theme version. Remove injected code.
  8. Refresh the Posts panel and bulk-delete any spam content that appears after the functions.php is cleaned.
  9. Check Google Search Console → Security Issues tab. If the casino pages were indexed, submit a Removal Request and then a reconsideration request after confirming the site is clean.
  10. Harden: enable 2FA on all admin accounts, disable PHP execution in wp-content/uploads, lock down wp-config.php, change all hosting/SFTP/database passwords.

How This Attack Got In

Tracing the entry point in this case pointed to a combination of factors common in European hosting environments:

Weak or reused admin credentials. The system-control plugin required admin-level access to install and activate. Either the credentials were brute-forced, phished, or reused from a breached service. The ghost “web panel” accounts confirm the attacker had full admin access at some point.

WP File Manager plugin vulnerability. Older versions of WP File Manager (visible in this site’s plugin list) have had critical unauthenticated file upload vulnerabilities — most notably CVE-2020-25213. An attacker with no credentials could upload arbitrary PHP files and achieve remote code execution. See the comprehensive list of known malicious WordPress plugins for context on which plugins introduce this kind of risk.

Outdated core and plugins. Every outdated plugin is a potential entry point. The risks of using outdated or nulled plugins apply equally to legitimate plugins left unpatched.

What Would Have Prevented This

Two-factor authentication on every admin account. Even with credentials stolen, 2FA blocks login. This is the single highest-impact change you can make. The WordPress login security guide covers the exact setup.

File integrity monitoring. A daily comparison of your root index.php file size against a known baseline would have triggered an alert within 24 hours of the injection — not weeks later when the client noticed the fake page by accident. The best WordPress security plugins guide covers which tools handle this well.

Audit mu-plugins regularly. A healthy WordPress site has zero unexpected files in mu-plugins. If you find anything in that directory you did not place there intentionally, treat it as malware until confirmed otherwise.

Check Google Search Console for Security Issues. The cloaking attack in this case had been running long enough to index casino content under the client’s domain. GSC would have flagged this under Security Issues → Manual Actions before the client noticed the fake homepage — if they had been monitoring it.

Regular offsite backups. The UpdraftPlus backup guide covers how to store clean backups in a location the malware cannot reach. A pre-infection backup makes recovery dramatically faster.

If you need a professional to handle this, my WordPress malware removal service covers this exact type of multi-layer infection with a clean-site guarantee. You can also hire me directly for a full forensic cleanup.

Frequently Asked Questions

Why is my WordPress site showing a completely different website to visitors?

Your root index.php file has most likely been replaced by a malware-modified version. The legitimate WordPress root index.php is under 30 bytes. A replaced file that is several kilobytes larger is delivering an attacker-controlled page to visitors while potentially serving different content (spam or casino pages) to search engines. Check the file size and modification date of your root index.php in your hosting file manager immediately.

Why does my WordPress admin show “All (11)” posts but the list shows “No posts found”?

This specific discrepancy is caused by malware injected into your theme’s functions.php. The injected code uses a posts_where filter to exclude spam posts (authored by ghost admin accounts) from the visible list, while separately running a second query to keep those posts included in the count. The count and the list are powered by different database queries — and the malware only targets the list. Checking your active theme’s functions.php for unusual code at the top of the file (especially large blocks of PHP with WordPress-sounding function names) will identify the injection.

What is the system-control plugin in WordPress?

There is no legitimate WordPress plugin called “system-control.” If you find a wp-content/plugins/system-control folder, a wp-content/mu-plugins/sc-loader.php file, or a hidden wp-content/.sc-backup folder on your WordPress site, these are components of a malware package. The sc-loader.php file describes itself as a “System Control auto-loader and integrity guard” — it monitors for the presence of the system-control plugin and restores it from the .sc-backup folder if deleted. All three must be removed simultaneously.

My deleted WordPress files keep coming back — how do I stop them?

If files you delete reappear immediately, you have a persistence mechanism with multiple mutually-protecting components. In the System Control malware family, sc-loader.php, .sc-backup, and the system-control plugin each restore the others when any one is deleted. Remove all three simultaneously: rm -rf wp-content/.sc-backup wp-content/mu-plugins wp-content/plugins/system-control. If you don’t have SSH access, use your hosting file manager’s multi-select delete feature to remove all three in a single action. See also: why WordPress malware keeps coming back.

What is amp.php doing in my WordPress root directory?

A file named amp.php in your WordPress root directory is not part of a standard WordPress installation. If found alongside a modified index.php that routes Googlebot traffic to it, amp.php is the spam payload — the content (often casino, pharmaceutical, or Japanese keyword spam) being served exclusively to search engine crawlers while human visitors see something else. Delete it immediately and replace all core files with a fresh WordPress download.

Can malware target Dutch or European websites specifically?

Yes. The casino spam in this case was specifically in Dutch and targeted the Netherlands and Belgium gambling market. Attackers often localize their spam payloads to match the target audience of the compromised domain — a Dutch-language website on Strato.nl hosting will have better SEO authority for Dutch-language gambling queries than a generic domain. This is why European hosting environments, including Strato.nl, TransIP, and SiteGround NL, are increasingly targeted for casino SEO spam injections.

About This Case Study

This case was handled directly in May 2026 on a WordPress site hosted at Strato.nl. I have removed malware from over 4,500 WordPress sites across ten years of specialized security work. Every screenshot, command, and code sample in this case study is from the actual infected site — not a reconstruction or simulation. Client-identifying information has been removed.

The functions.php post-hiding technique documented in Layer 4 is one I had not seen published in this exact form before handling this case. If you are encountering a post count vs. post list discrepancy on your WordPress site, this is the most likely explanation.

MD Pabel — WordPress Malware Removal Specialist | Malware Removal Service | Hire Me | All Case Studies

Explore Our Security Services

About the Author

MD Pabel

MD Pabel

MD Pabel is the Founder and CEO of 3Zero Digital, a leading agency specializing in custom web development, WordPress security, and malware removal. With over 8+ Years years of experience, he has completed more than 3200+ projects, served over 2300+ clients, and resolved 4500+ cases of malware and hacked websites.

Similar Forensic Investigations