Safeguard
Security Guides•

A client site looks compromised: what should an agency do first?

Preserve evidence, limit damage, restore from a known good backup, rotate credentials and tell the client. A first hour checklist for suspected compromise.

Safeguard Security Team
4 min read

When a client site looks compromised, preserve logs and a copy of the files, limit further damage, restore from a known good backup, rotate every credential the site could reach, and tell the client early. Do not start by deleting things.

This is a general checklist built on guidance in the WordPress handbook. Your host may have its own procedure and may need to be involved, so contact them at the start.

The first hour

StepActionWhy
1Tell the client and your internal leadDecisions about downtime need an owner
2Contact the hostThey can help with isolation and server logs
3Copy logs and a snapshot of the files and databaseEvidence disappears when you clean up
4Limit damage: maintenance page, or block access if neededStops visitors being harmed
5Change credentials: hosting, database, CMS admins, repository tokensAssume the old ones are known
6Find the entry pointFixing symptoms without the cause invites a repeat
7Restore from a known good backup, then patchCleaning in place can miss files

Why logs come first

The hardening guide says logs let you see what was done, when and from where, and that attackers leave traces in logs or the file system, such as new or modified files. It also notes that logs show the IP and time of actions even if they do not show a username. So copy them before anything changes.

Where attacks usually enter

The handbook says the most common attacks fall into two categories: crafted requests that exploit known flaws in outdated plugins and software, and brute force password guessing. Check both. Look at which plugins and themes were out of date, and review login attempts and recent changes to administrator accounts.

Restore carefully

Restoring from a backup helps only if the backup predates the compromise. The WordPress backup guidance suggests keeping several recent copies in different locations, which is what lets you pick an older clean one. Restore files first, then the database, then patch the entry point before reconnecting the site to the internet.

After the first hour

  1. Find new administrator users and remove those you do not recognise.
  2. Review recently modified files against your repository or a clean copy.
  3. Rotate secrets stored in the site: API keys, mail credentials, database passwords.
  4. Check whether personal data may have been exposed, and take advice on any duty to notify. That is a legal question that depends on the client and region.
  5. Write a short incident note: what happened, when, impact and what changed.

Close the gap

Add what you learned to the retainer: the missing update, the extra admin, the untested backup. The best use of an incident is a smaller next one.

Try it yourself

Click through it at your own pace, or open it full screen. Look at how a new advisory is matched to components in use; that is the check that tells you which sites to look at first.

Safeguard's free scan can check a project's dependencies, but it does not replace host level forensics.

Quick check

Should I delete the malicious files immediately?

Copy them and the logs first. Removing them before you understand the entry point can destroy evidence and let the attacker back in.

Do I have to tell the client?

Yes, early. Tell them what you know, what you do not yet know and when you will update them.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.