Skip to content
Website improvement

Website Hacked: What to Do in the First 24 Hours

A practical response plan: contain the breach, preserve evidence, find the entry point and restore a verified copy safely.

Icy blue glass security shield, lock, compromised browser and recovery arrows

A practical response plan: contain the breach, preserve evidence, find the entry point and restore a verified copy safely. Below is a practical review you can apply to a real project without unnecessary expenses or unrealistic promises.

The aim is not to chase superficial metrics but to understand customer needs, reliable data and the business results that matter.

First minutes: limit the damage

If a site redirects visitors, displays strange advertising or serves suspicious content, stop routine updates and isolate affected functions. Record the symptoms and retain relevant server logs before attempting a cleanup.

Deleting everything immediately can remove evidence of how the breach happened. The infected version may also be needed to assess what data was exposed.

  • Write down when the symptoms began.
  • Keep logs and a protected snapshot of the current state.
  • Assess whether any data-exposure notification obligations apply.

Find the entry point

Inspect recently modified PHP files, unfamiliar administrator accounts, outdated plugins and themes, Cron tasks and redirect rules. A visible injected banner is often only one symptom of a wider compromise.

The home page opening normally again does not mean the server is clean: backdoors, hidden files or compromised credentials may remain.

  • Rotate passwords and keys after isolation.
  • Review CMS and extension versions.
  • Inspect .htaccess and unknown executable scripts.

Restore from a verified source

The safest starting point is a known-clean backup of both files and database, checked in a private test environment. A backup made yesterday is not necessarily clean if the compromise began earlier.

Update vulnerable components and test forms, logins and permissions before returning the site to production. Do not restore compromised credentials along with the content.

  • Recover in a non-public environment first.
  • Verify content, orders and customer data.
  • Test essential features before switching traffic back.

After the website is back online

Review key pages, enquiry forms, transactions, sitemap and indexing. If search engines saw injected content, some pages may need another crawl after the cleanup.

A recovery is complete only when you reduce the chance of recurrence through updates, controlled access, off-site backups and basic file-integrity monitoring.

  • Review logs after reopening the site.
  • Remove unused plugins and excessive permissions.
  • Document a short incident-response checklist.

An illustrative scenario

Suppose unknown pages appear in search results and redirect rules have been changed. Restoring only the home page leaves the original entry point untouched; the safer route is to preserve evidence, isolate the infection and deploy a checked copy with new credentials. This example illustrates the process rather than a specific client incident.

Practical action plan

  1. Define the business question, baseline and available data before changing the setup.
  2. Check the essential technical details and note any unknowns or measurement limitations.
  3. Agree on one testable hypothesis and a measurable success criterion.
  4. Run a bounded test, document what changed and assess qualified enquiries or completed work.

For smaller B2B teams, make responsibilities and deadlines explicit. Any high-impact website change should have a recoverable backup and an agreed validation process.

Frequently asked questions

Is deleting the malicious file enough?

Not always. A hidden entry point or a compromised administrator may recreate it.

When can the site safely reopen?

After the files, credentials and essential functions have been checked and the root cause has been addressed, not simply when the visible symptom disappears.

What to do next

For professional help with this work, explore the relevant IQDesign service. You may also find Technical website audit: errors that affect stability and SEO and Website maintenance: what a support agreement should cover useful as you plan your next steps.

Topics in this article

Need help recovering a website?

We can help assess the problem, restore a verified version and organise ongoing technical support.

Discuss a project ↗