Share This
//WordPress website hacked through an outdated plugin: from detection to full recovery

WordPress website hacked through an outdated plugin: from detection to full recovery

If you run WordPress, security isn’t just a nice-to-have—it’s survival. Here’s why:

  • Over 40% of all sites on the web are powered by WordPress (W3Techs.com stats). With that level of popularity, hackers see it as prime hunting ground.
  • WordPress is open-source, meaning the core code is public. Great for developers, but it also means bad actors can study it to spot weak points. The WordPress core team patches things fast, but not every site owner keeps up.
  • Then there’s the massive plugin and theme ecosystem—tens of thousands of add-ons built by third parties. It’s powerful but also risky: some plugins go unmaintained or ignore proper security practices, leaving big holes that admins might not notice right away.
  • Long story short: skipping updates—core or plugins—can leave doors wide open.

In this post, we’ll walk through a real-world case we had to deal with: a WordPress site compromised because of an outdated plugin. From spotting the issue to cleaning it up, here’s how it went down—and what we learned.

Signs the Site Was Compromised

What tipped us off? Some very obvious red flags:

  • Mobile users or logged-out visitors were redirected to shady spam or gambling sites.
  • Google Search showed the warning: “This site may be hacked.”
  • Strange URLs were indexed in Google that didn’t match legit content (a quick check via “site:domain.com” showed them).
  • Some plugins just stopped working, and bits of their code looked tampered with.

Finding the Root Cause

A log and code audit pointed to one plugin: xyz-forms-lite (*name and file references changed for privacy).
It hadn’t seen an update in over three years and contained suspicious files like wp-fix.php and db1.php. On top of that, code using base64_decode() and eval() had been injected into functions.php—classic signs of a backdoor.

How We Handled It

Step 1: Take the Site Offline

We put the site into maintenance mode via .htaccess changes. Better to show a downtime page than risk serving malware.

Step 2: Back Everything Up

Before touching a single file, we backed up the whole system—code and database—so we’d have a clean snapshot for reference or forensic work later.

Step 3: Remove the Compromised Plugin & Malicious Code

The plugin was deleted completely. Then we searched for bad code:

grep -R “base64_decode” .
grep -R “eval(” .

Theme and plugin files were compared to clean vendor versions to catch anything that looked off.

Step 4: Reinstall WordPress Core & Plugins from Clean Sources

Fresh core install via CLI:

wp core download –force

Plugins were reinstalled only from trusted sources (wordpress.org) and only those that are actively maintained.

Step 5: Scan for Malware & Harden Security

Installed Wordfence to run a deep scan and clean up leftovers.
Enabled a Web Application Firewall and configured alert notifications.

Step 6: Update Everything

Every plugin was updated to its latest version. Custom theme and plugin code were also synced with the new WordPress core.

Step 7: Bring the Site Back & Request Google Review

If Google flagged your site or indexed junk URLs:

  • Head to Google Search Console → Security & Manual Actions → request a review once you’re sure the site is clean.
  • Use the Removals tool to purge bad URLs from search results.

removing URLs in Google Search Console after incident resolution

Submitting URL removal requests in Google Search Console once the cleanup is done

Key Takeaways

– Don’t run unmaintained or flagged plugins.
– Back up your system regularly—it’s a lifesaver.
– Watch for code changes using tools like WP Activity Log or version control.
– Set up a security plugin (Wordfence is solid) and alerts for abnormal activity.
– Lock down admin access with CAPTCHA, IP rules, or two-factor auth.

Handy WordPress Tools/Plugins

ToolPurpose
WordfenceMalware scan + firewall
Sucuri ScannerMalware checks and file integrity monitoring
WPvivid BackupAutomated backups
LoginizerBrute-force login protection
WP Activity LogTracks every action in the admin area

WordPress security isn’t “set it and forget it.” It’s an ongoing routine—patching, scanning, and watching for signs of trouble.

Hopefully this breakdown helps other admins spot and handle similar risks before they turn serious.

Phung Huu Kien
S-Chief

APPLY NOW






    Benefits

    SALARY & BONUS POLICY

    RiverCrane Vietnam sympathizes staffs' innermost feelings and desires and set up termly salary review policy. Performance evaluation is conducted in June and December and salary change is conducted in January and July every year. Besides, outstanding staffs receive bonus for their achievements periodically (monthly, yearly).

    TRAINING IN JAPAN

    In order to broaden staffs' view about technologies over the world, RiverCrane Vietnam set up policy to send staffs to Japan for study. Moreover, the engineers can develop their career paths in technical or management fields.

    ANNUAL COMPANY TRIP

    Not only bringing chances to the staffs for their challenging, Rivercrane Vietnam also excites them with interesting annual trips. Exciting Gala Dinner with team building games will make the members of Rivercrane connected closer.

    COMPANY'S EVENTS

    Activities such as Team Building, Company Building, Family Building, Summer Holiday, Mid-Autum Festival, etc. will be the moments worthy of remembrance for each individual in the project or the pride when one introduces the company to his or her family, and shares the message "We are One".

    INSURANCE

    Rivercrane Vietnam ensures social insurance, medical insurance and unemployment insurance for staffs. The company commits to support staffs for any procedures regarding these insurances. In addition, other insurance policies are taken into consideration and under review.

    OTHER BENEFITS

    Support budget for activities related to education, entertainment and sports. Support fee for purchasing technical books. Support fee for getting engineering or language certificates. Support fee for joining courses regarding technical management. Other supports following company's policy, etc.

    © 2012 RiverCrane Vietnam. All rights reserved.

    Close