The short answer

Clean a hacked website when the attack is recent, the cause is known and the software is up to date. Rebuild when the site has been reinfected after a cleanup, when both the files and the database are infected, when nobody knows how long the attacker had access, or when the site runs on outdated software. A rebuild moves your content to a clean site and leaves the old code behind.

Key takeaways

  • Cleaning works when you know exactly what happened and when.
  • A second infection after a cleanup is the clearest sign to rebuild.
  • A rebuild moves content, not code. Text and images come across after checking; old programs don't.
  • Keep a copy of the infected site either way.

After a hack there are two ways forward: clean the existing site, or rebuild it somewhere clean. Cleaning sounds quicker and cheaper. Sometimes it is. Here is how we decide.

When cleaning is the right call

Cleaning is reasonable when all of these are true:

  • The attack is recent and you know roughly when it started.
  • You know how the attacker got in, and that weakness can be fixed.
  • The site's software is current and still supported.
  • You have a backup that is clearly older than the attack.
  • The hosting company has access logs you can check.

In that situation you can restore the known-good backup, fix the weakness, change every password and watch the site closely.

When to rebuild instead

Rebuild when any of these is true:

  • It has already been cleaned and reinfected. Whatever lets the attacker back in survived the last cleanup, and it will probably survive the next.
  • Both the files and the database are infected. There is no clean half to build on.
  • Nobody knows how long the attacker had access. Without a start date, no backup can be trusted.
  • The software is outdated or no longer supported. Cleaning puts the same weakness back online.
  • There are no logs. Without them you can't confirm how the attacker got in, so you can't confirm it's closed.
  • The attacker had administrator or database access. With that level of control, anything on the site could have been changed.

What a clean rebuild involves

A rebuild doesn't mean starting your content over. It means moving the content and leaving the code.

  1. Keep a full copy of the infected site as a record, stored separately.
  2. Set up new hosting with new accounts and new passwords. Nothing is shared with the old server.
  3. Build the new site with current, supported software.
  4. Move content across after checking it. Text is copied as plain text. Images are verified and re-saved so nothing hidden travels with them.
  5. Move records such as past orders or requests as data, never as old program files.
  6. Keep existing page addresses working so links and search results don't break.
  7. Point the domain at the new site, with email planned so it keeps working.
  8. Shut the old server down once nothing depends on it.

A stopgap while you rebuild

If the site runs something people rely on daily, such as a request form or a booking page, a simple temporary version on separate, clean services can keep work moving while the rebuild happens. It should share nothing with the infected server.

The short version

If you can say exactly what happened, when, and how it was fixed, clean. If you can't, rebuild.

Frequently asked questions

Is rebuilding more expensive than cleaning?

A single rebuild usually costs more than a single cleanup. But a cleanup that fails has to be paid for again, and the site is down each time. For a site that has already been reinfected, rebuilding once is often the cheaper path.

Will I lose my content if the site is rebuilt?

No. Pages, text, images and records are moved to the new site after they have been checked. What gets left behind is the old code, where the attacker's files hide.

How long does a rebuild take?

It depends on the size of the site and what it does. In one recovery we handled, a temporary replacement for the most urgent function was ready in under three weeks and the new site was live in about a month.

Can I keep my domain name and email?

Yes. The domain is pointed at the new site once it's ready, and email can keep working through the switch if the change is planned carefully.

Want a second pair of eyes on your site?

Within one business day

Your messageOur reply

Tell us what’s going on. We reply within one business day.

  • Reply within one business day

    Tell us what’s going on and you’ll hear back by the next business day.

  • Fixed or range-based pricing

    The scope is written down before work starts. No hidden fees.

  • You own every account

    Domain, hosting, data and code stay yours. No lock-in.