Skip to content

Recovering a Malware-Infected WordPress Site (and Bringing It Back to Life)

Every once in a while, a project comes along that turns into a full-on rescue mission. This was one of those.

The BrandFocused.com hosting account had been taken offline due to a malware infection. What started as a simple “let’s get the site back up” quickly turned into a multi-day cleanup, rebuild, and modernization effort.

Step 1: Understanding the Situation

The site was running on an older PHP version (7.4), required by a legacy theme called UBER theme. Because the theme is no longer maintained, upgrading PHP hadn’t been an option—creating a potential security vulnerability over time.

Once the malware was detected, the hosting account was suspended until the site could pass a full security scan.

Step 2: Malware Cleanup (The Intensive Part)

Malware rarely lives in just one place. It spreads.

I worked through the file system to identify suspicious files and directories—many of which were disguised or buried in unexpected locations. These were initially moved into a quarantine directory for review.

From there:

  • Core WordPress files were replaced with a clean installation
  • Infected or unknown files were removed
  • Backup assets (including theme files) were restored from Dropbox

Step 3: The Scan Cycle

Because the hosting was disabled, Bluehost required repeated security scans before reactivation.

Each scan:

  • Took about 2 hours (sometimes longer)
  • Produced a report of flagged files
  • Required a completely clean result (zero issues) to pass

One key lesson: even quarantined files still get flagged. So anything in quarantine had to be fully deleted before the scans would pass.

This process took several rounds—running scans, reviewing results, cleaning files, and repeating until everything came back clean.

Step 4: Getting the Site Back Online

Once the scans passed, the hosting was reactivated—but the site itself wasn’t working correctly.

The issue: PHP compatibility.

The hosting environment had moved forward, but the UBER theme had not.

Step 5: Modernizing a Legacy Theme

Since the theme is no longer supported, I took a hands-on approach:

  • Enabled error logging
  • Identified deprecated functions and compatibility issues
  • Worked through errors layer by layer

Using AI as a development assistant, I rewrote portions of the theme’s functions to align with newer PHP standards.

This is actually a pretty powerful workflow:

  • Trigger an error
  • Identify the issue
  • Refactor the code
  • Repeat

Step by step, the theme was brought back into a working state on a modern PHP version.

The Result

  • Malware fully removed
  • Hosting account restored
  • Site running on an updated PHP environment
  • Legacy theme made functional again

A Note on Hosting Support

One thing worth calling out—Bluehost was great throughout this process.

They were responsive, helpful with initiating scans, and—most importantly—gave the opportunity to fully clean and restore the site rather than permanently shutting the account down. That flexibility made a big difference in getting everything back online.

Final Thoughts

This kind of project is a good reminder of how important it is to keep sites updated—not just for performance, but for security. If a site is running on outdated themes or older PHP versions, it can quietly become vulnerable over time. That said, even in worst-case scenarios, recovery is possible—with the right process, a bit of patience, and a willingness to dig into the details.

Return to Blog
Back To Top