Skip to content
Cyberphore

Threat landscape

Hacked Website Repair: What to Do in the First 24 Hours

Hacked website repair for Canadian businesses: the first 24 hours, from containment and evidence to cleanup, Google's review and PIPEDA breach duties.

Published
Updated
Read time
8 min
On this page · 10 sections, 8 min read

If your business website has been hacked, the first 24 hours should go in this order: take it offline from outside the infected server, copy everything before you change anything, lock the attacker out, find how they got in, then clean or restore. Only after that do you ask Google to lift its warnings and decide what to tell customers and, if personal information was involved, the Privacy Commissioner.

Most cleanup guides stop at "remove the malware." The costly mistakes come before and after that step: wiping evidence in the rush to get back online, and missing the privacy question. This guide is general information, not legal advice. If the site is down or attacking visitors right now, go to our emergency page first.

First, Read the Symptom

How the hack shows itself tells you how urgent the privacy question is. WordPress.org lists common indicators of compromise: a blocklisting by Google or Bing, a host disabling the site, visitors' antivirus flagging it, unexplained new users, or a hack you can see in the browser (WordPress.org, 2026).

What you see What it usually means Privacy risk
Defaced home page Attacker wants attention; may also have planted code Lower, unless forms or the database were reached
Spam pages or links in Google results SEO spam injection, often hidden from you Lower, but shows write access to your server
Redirects to other sites Injected code in pages or server configuration Medium: visitors are being sent to malware or scams
Fake login or payment page Phishing hosted on your domain High: assume people entered real details
Changed checkout or form scripts Possible card or data skimming High: treat customer data as exposed

Spam can be invisible to you. Google explains that hackers use cloaking to show spam to search engines but not the owner, and target specific referrers such as Google (Google Search Console Help). A clean page in your own browser proves nothing.

Sample screen; data is illustrative.

Hour 0 to 1: Contain Without Destroying

Take the Site Offline Properly

Google's recovery guidance says to stop the web server or point DNS to a static page on a different server that returns a 503 status (Google, web.dev). Two common shortcuts fail: an error code served from the infected server can still deliver harmful content, and a robots.txt block only stops search crawlers, not people. Google adds that temporary downtime during recovery is unlikely to affect rankings. The Cyber Centre likewise advises replacing a defaced site with a maintenance page immediately (Canadian Centre for Cyber Security, 2024).

Call Your Host and, If You Have One, Your Insurer

Tell your host straight away. On shared hosting the hack may reach beyond your site, and the host can confirm whether it is a compromise or an outage (WordPress.org, 2026). If you hold cyber insurance, check whether the policy requires you to use its approved responders before you hire anyone. Our list of who to call after a cyber attack sets out the order.

Start a Written Log

WordPress.org's first actionable step is documentation: what you saw, when (with time zone), and what changed recently, such as a new plugin or theme edit (WordPress.org, 2026). That note becomes your incident report and, if needed, the basis of a privacy breach record.

Hours 1 to 4: Preserve Evidence and Lock the Attacker Out

Copy Before You Clean

Do not skip this step in the rush to get back online. Google tells owners with no clean backup to make two copies of the infected site, a disk image and a file system copy including the database, labelled "infected" (Google, web.dev). WordPress.org also recommends one more snapshot, even of an infected site, before cleaning starts (WordPress.org, 2026). Ask your host for the access and error logs too. WordPress's hardening guide notes that logs show the IP address, time and actions an attacker took, including brute force attempts and attacks such as cross-site scripting and file inclusion (WordPress Developer Resources, 2026). Without that copy, you cannot answer the privacy question later.

Remove Rogue Accounts, Then Change Every Credential

Google's guidance: list all user accounts, write down any the attacker created, delete them, and change passwords for every site account, including FTP, database, system administrator and content management system logins (Google, web.dev). For WordPress, also replace the secret keys in wp-config.php, which forces anyone still logged in out of the site, and include the hosting control panel and MySQL in the reset (WordPress.org, 2026).

Then check Search Console itself. Google advises confirming the attacker did not verify ownership, removing unauthorized owners and their verification tokens, and checking settings (Google, web.dev). If Google sent a phishing notice, keep it until recovery is complete.

Scan the Computers That Log In

Google and WordPress.org both warn that attacks often start on an administrator's own computer, through malware that captures logins (Google, web.dev; WordPress.org, 2026). Scan every device used to sign in to the site, or new passwords will leak the same way.

Hours 4 to 12: Find the Way in, Then Clean

Fix the cause before the symptoms. Google notes there may be several independent hacks in place (Google, web.dev). The usual suspects are out-of-date software, weak or reused passwords, and coding flaws such as open redirects and SQL injection.

On WordPress, start with plugins. Patchstack counted 11,334 new vulnerabilities in the WordPress ecosystem in 2025, 91% of them in plugins, and only 6 low-priority issues in core (Patchstack, 2026). It also reports that 46% of vulnerabilities had no fix from the developer at public disclosure, and that heavily exploited flaws were typically attacked within a weighted median of 5 hours.

Why Deleting the Odd Files Is Not Enough

Malware data from Monarx, published in Patchstack's report, shows attackers increasingly inject code into legitimate core, plugin and theme files rather than dropping obvious new ones, and that uploader scripts nearly doubled in June 2025, giving attackers a way back in after a cleanup (Patchstack, 2026). It also found malicious file uploads nearly tripled in November and December 2025.

So the cleanup has to be thorough:

  1. Restore or rebuild from a clean source. Use a backup only if it predates the hack, then patch everything, remove unused software, fix the vulnerability and change all passwords again (Google, web.dev). With no clean backup, WordPress.org suggests replacing /wp-admin and /wp-includes with fresh copies of the same version by SFTP, not through the dashboard, because built-in reinstalls often overwrite files without removing new ones (WordPress.org, 2026).
  2. Check the high-value files by hand. WordPress.org names .htaccess, index.php, header.php, footer.php and functions.php as frequent targets.
  3. Check the database. Look for ordinary text fields that now contain iframes or scripts (Google, web.dev).
  4. Harden before going live. Delete unused plugins, keep the rest updated, turn on two-step authentication and disable dashboard file editing with DISALLOW_FILE_EDIT (WordPress Developer Resources, 2026).

Hours 12 to 24: Verify, Ask Google, Tell People

Test, Then Request a Review

Check cleaned pages with curl or Google's URL Inspection tool, which shows what Google sees, rather than trusting your browser (Google Search Console Help). Google says to fix every listed issue on every page before selecting Request Review; partial fixes do not earn a partial return. As of November 17, 2026, Google says reviews take from a few days to a few weeks, and resubmitting before the issue is fixed can lengthen the next review or get the site marked as a repeat offender.

Google's older recovery guide gives typical times: about a day for phishing reviews, a few days for malware and up to several weeks for spam, with browser and search warnings removed within 72 hours of a successful review (Google, web.dev). Pages must be crawlable, so remove any noindex or robots.txt blocks you added during cleanup. If Google detected the hack automatically rather than manually, the content is reincluded once a normal recrawl finds it clean (Google Search Console Help).

Tell Customers, Partners and the Police

The Cyber Centre's defacement guidance tells organizations to inform customers, suppliers and other third parties, make a public statement, and report the incident to police (Canadian Centre for Cyber Security, 2024). You can also report through the Cyber Centre's online form; it is not a law enforcement agency, so contact police for anything criminal (Canadian Centre for Cyber Security, 2026). Keep the message factual: what happened, what visitors should do, and where updates will appear. If checkout pages were altered, call your payment processor and check your merchant agreement for notice duties.

When a Website Hack Becomes a Privacy Breach

Under PIPEDA, the loss of, or unauthorized access to or disclosure of, personal information resulting from a failure of security safeguards is a breach of security safeguards. Small businesses are covered (Office of the Privacy Commissioner of Canada, 2025). If the breach creates a real risk of significant harm, judged on the sensitivity of the information and the probability of misuse, you must report it to the Office of the Privacy Commissioner and notify affected individuals as soon as feasible. Knowingly breaking these rules is an offence that could lead to fines.

On a website, the usual triggers are a checkout skimmer, a phishing page that collected logins, or database access to customer accounts or form submissions. Your infected copy and logs are what answer the question. The OPC report must describe the circumstances and cause if known, the date or period, the information involved, the number of people affected, mitigation steps, notification plans and a contact person (Breach of Security Safeguards Regulations, SOR/2018-64). The same regulations require a record of every breach of security safeguards for 24 months, reportable or not. Quebec, Alberta and sector rules differ; our privacy breach response guide covers them.

Your First-24-Hours Checklist

  • Site offline from outside the infected server (503 maintenance page)
  • Host and insurer told; written log started
  • Full copy of files, database and logs saved and labelled "infected"
  • Rogue accounts removed; every password and WordPress secret key changed
  • Search Console owners checked; administrator computers scanned
  • Entry point found and fixed, not just the visible malware
  • Site restored from a pre-hack backup or rebuilt from clean sources, then hardened
  • Pages verified clean outside your browser; Google review requested
  • Customers, partners and police informed; payment processor called if checkout was touched
  • Privacy breach assessment done and recorded

For a larger incident, where the attacker may have reached email or internal systems too, bring in incident response.

How Cyberphore Can Help

Cyberphore repairs hacked business websites: we contain the site, preserve evidence, remove malware and backdoors, close the entry point and request removal from Google's warnings once the site is verified clean. Our team members hold industry certifications including CISSP, OSCP and GIAC, and pricing is quoted after a free scoping call. See our website and application security service for repair and ongoing protection.

Services for this topic

Share this article

Questions and Answers

How long does it take to fix a hacked website?

A small business site can often be contained, cleaned and resubmitted to Google within a day or two if a clean backup exists. Google's own review then takes from a few days to a few weeks, and its guidance says warnings are removed within 72 hours of a successful review. Sites with no clean backup or several backdoors take longer.

Should I just restore my website from a backup?

Only from a backup made before the compromise, and only after you know how the attacker got in. Restoring the same vulnerable plugin or a reused password lets them straight back in. Google recommends patching all software, removing unused plugins, fixing the vulnerability and changing every password after the restore.

Do I have to report a hacked website to the Privacy Commissioner?

Only if personal information was involved and the breach creates a real risk of significant harm. Under PIPEDA you must then report to the Office of the Privacy Commissioner and notify affected individuals as soon as feasible. You must keep a record of every breach of security safeguards for 24 months, even ones you do not report.

Why does Google still show my site as hacked after I cleaned it?

Google does not lift a manual hacked-site flag until you request a review in the Security Issues report of Search Console. Its guidance says a review can take from a few days to a few weeks. If the review fails, the report may list more sample URLs, which usually means a backdoor or injected page was missed.

Sources (14, primary and official first)

  1. Security issues report (opens in a new tab) · Google Search Console Help,
  2. Why is my site labeled as dangerous in Google Search? (opens in a new tab) · Google Search Console Help,
  3. Quarantine your site (opens in a new tab) · Google (web.dev),
  4. Use Search Console (opens in a new tab) · Google (web.dev),
  5. Clean and maintain your site (opens in a new tab) · Google (web.dev),
  6. Request a review (opens in a new tab) · Google (web.dev),
  7. Identify the vulnerability (opens in a new tab) · Google (web.dev),
  8. Help I think I've been hacked (opens in a new tab) · WordPress.org Documentation,
  9. Hardening WordPress (opens in a new tab) · WordPress Developer Resources,
  10. Website defacement (ITSAP.00.060) (opens in a new tab) · Canadian Centre for Cyber Security,
  11. Report a cyber incident (opens in a new tab) · Canadian Centre for Cyber Security,
  12. What you need to know about mandatory reporting of breaches of security safeguards (opens in a new tab) · Office of the Privacy Commissioner of Canada,
  13. Breach of Security Safeguards Regulations (SOR/2018-64) (opens in a new tab) · Justice Laws Website,
  14. State of WordPress Security in 2026 (opens in a new tab) · Patchstack,

General information for Canadian organizations, not legal advice.

Written by

Cyberphore Security Team

Certified security analysts and consultants

  • CISSP
  • CISM
  • OSCP
  • OSCE
  • GIAC GCIH
  • GIAC GCIA
  • GIAC GPEN
  • Microsoft SC-200

Articles are researched and written by Cyberphore's security team. Every team member, from analysts to leadership, holds industry certifications, and the team monitors and responds to threats for Canadian organizations 24/7/365. Every article is fact-checked against its sources and reviewed before publishing.

How we research, fact-check and update articles: editorial standards. Spotted an error? Email Use our contact form.

Incident happening now? Our team answers 24/7: +1 236 665 1165

Keep reading

Continue Reading

Book free assessment