Restore a Backup or Clean a Hacked WordPress Site?

WordPress incident response

Need help with a hacked WordPress site?

If this article sounds familiar, send me the site URL and what you are seeing. I will help you work out whether you need cleanup, rollback, or urgent incident response.

You will be speaking to the person doing the investigation and cleanup work, not a generic support queue.

Ferre Mekelenkamp

Ferre Mekelenkamp

Senior developer handling WordPress malware cleanup and incident response.

One of the first real decisions after a WordPress compromise is whether to restore a backup or clean the current site.

There is no universal answer.

The right choice depends on the backup quality, the incident timeline, and how much business data you would lose by rolling back.

When restoring a backup is often the better move

Rollback is often attractive when:

  • you have a known-clean backup from before the compromise
  • the site is mostly brochure content or low-change publishing
  • there is little operational data at risk between the clean backup and now
  • restoring is faster and safer than proving a manual cleanup is complete

In those cases, rollback is often the cleanest way to get back to a trusted state.

When manual cleanup makes more sense

Manual cleanup usually makes more sense when rollback would create real business damage.

Typical examples include:

  • WooCommerce stores with recent orders
  • membership sites with new users or subscription changes
  • lead-generation sites with important form submissions
  • custom operational systems where records changed after the backup point
  • cases where the available backups may already be contaminated

That is why this is not only a security decision. It is also an operations and data-loss decision.

If you need the broader workflow behind that choice, the WordPress incident response process page explains how I approach triage before deciding on restore, cleanup, or escalation.

Questions to ask before deciding

1. Do we trust the backup?

A backup only helps if it predates the compromise and you have good reason to believe it is clean.

2. What data would rollback destroy?

Think about orders, registrations, leads, content edits, bookings, subscriptions, and anything else the business cannot casually lose.

3. How deep does the compromise look?

If you are seeing hidden admin users, wp-config.php edits, mu-plugins, redirects, or SEO spam, assume the incident needs proper cleanup work rather than a quick plugin reinstall.

4. Which path gets you back to a trustworthy production state faster?

Sometimes that is rollback.

Sometimes it is a controlled cleanup because rollback would create too much operational fallout.

Why WooCommerce changes the answer

WooCommerce incidents often push teams away from simple rollback because the store keeps accumulating commercially important data.

That can include:

  • recent orders
  • order status changes
  • customer accounts
  • coupon activity
  • shipping or fulfillment state
  • plugin-driven automation

That does not mean a store should never roll back.

It means the cost of rollback is usually higher, so the decision needs more care.

Common mistakes

A few patterns create unnecessary pain:

  • restoring a backup without checking whether it predates the compromise
  • updating the compromised plugin and assuming cleanup is done
  • deleting obvious malware while ignoring hidden persistence
  • choosing rollback or cleanup based only on convenience

Those are the choices that lead to repeat incidents and false confidence.

The practical rule of thumb

If you have a genuinely clean restore point and little business data to lose, rollback is often the safer answer.

If the site is a live business system and rollback would do more damage than a careful cleanup, manual cleanup may be the better move.

The important thing is to decide deliberately.

If you need help deciding

If you are in the middle of that decision now, the most relevant next pages are:

Because once a WordPress incident becomes real, the useful question is not which option feels simpler.

It is which option gets you back to a trustworthy production state with the least total risk.

Restore a Backup or Clean a Hacked WordPress Site? | Ferre Mekelenkamp