KaramoTech
← All insights

WordPress · 2026-11-19 · 9 min read

WordPress Site Hacked? Do These Things First

WordPress site hacked? Follow a practical response plan: preserve evidence, contain damage, rebuild from trusted sources, verify recovery and avoid common mistakes.

KaramoTech Editorial

WordPress Site Hacked? Do These Things First: illustration

A strange redirect appears on your website. Customers are seeing a browser warning. Or your hosting company emails to say it found suspicious files. You need to respond, but you also need to avoid making a bad situation harder to investigate.

Start here: this is a triage and recovery guide for WordPress site owners, not a claim that you can safely remove every infection yourself. If your shop processes payments, keeps customer records, or is currently serving malicious content, involve your host and a qualified incident responder immediately. Keep a timestamped record of what you see.

If customers may be at risk right now

Ask your host or security provider to restrict public access to affected pages, remove malicious redirects or phishing content from view, and preserve the original evidence. Don't assume a basic WordPress maintenance-mode plugin is a safe containment strategy on a compromised site. Escalate potential data exposure and payment issues promptly.

1. First, check whether this looks like a security incident

A site that is broken is not necessarily hacked. A plugin update, caching problem or expired certificate can produce alarming symptoms. But some signals warrant an incident response rather than routine troubleshooting:

01Unexpected redirects

Visitors are sent to domains or advertisements you don't recognize—especially on mobile.

02Unknown administrator

An account with elevated access exists that nobody on your team created.

03New pages or spam

Search results show unfamiliar content, or Google reports hacked pages.

04Host or browser warning

A host suspends the site, or visitors see malware/phishing warnings.

Take screenshots, note the affected URL and the local time with time zone, and copy the exact warning text. Try a second clean device if practical. Do not visit suspected malicious destinations repeatedly just to confirm the problem. Your host and Search Console reports are usually safer starting points.

Google's Search Console has a Security Issues report for detected compromises, but a report with no warnings does not clear the site. See Google's Search Console guidance.

2. Decide what to do next—before changing files

This short triage tool helps identify when you should stop and involve professionals. It is a decision aid, not a malware scanner; your answers stay in this browser page and are not submitted anywhere.

Interactive decision aid

Should you continue yourself?

Choose the closest answer. Unsure? Treat that uncertainty as a reason to get help.

Don't install five security plugins in a panic.

New software installed on a compromised site can overwrite logs, change files, disrupt the website or give a false sense of certainty. Capture the original state and coordinate with your hosting provider first.

3. The six-stage recovery plan

Think of recovery as a sequence. Removing a suspicious file is not the finish line, and neither is restoring yesterday's backup.

Six stages: record, contain, preserve, rebuild, verify and monitor
Original KaramoTech recovery sequence. This is an instructional diagram, not a screenshot of an infected website.
1

Record the incident

Write down when the problem started, what changed just before it, which URLs or accounts appear affected, and who has been notified. Save screenshots and host alerts. Capture relevant DNS, hosting, plugin and user inventories. Follow your organisation's evidence-handling policy for personal or sensitive information.

2

Contain ongoing harm

Contact the hosting provider through a trusted contact route. Ask it to help restrict malicious public pages, preserve logs/snapshots and identify whether the account or server is also affected. Restrict access to the compromised environment; use a known-clean device for account recovery. Avoid changing every setting before evidence is preserved.

3

Preserve the files, database and relevant logs

With your host or responder, retain a timestamped copy of affected files and database for review, ideally alongside web, error and authentication logs. Store evidence securely, limit access and keep a note of every action. Do not treat that copy as a clean backup for production restoration.

4

Rebuild from trusted sources—and fix the entry point

For a serious compromise, work with a professional to identify and correct the underlying cause. Restore a known-good backup only after determining that it predates the compromise, or rebuild WordPress core/plugins/themes from trusted distributions. Review custom code, uploads, scheduled tasks, database changes, administrator accounts, hosting access and adjacent sites. Patch vulnerable components and rotate affected credentials, keys and sessions via trusted paths. A restore without closing the entry point can be compromised again.

5

Verify recovery before reopening

Test the recovered site in isolation or staging where feasible: homepage, key landing pages, forms, checkout if applicable, legitimate redirects, admin roles, email sending and backups. Recheck hosting-level integrity and vulnerability status. Request a Google Search Console security review if a relevant Security Issues warning was issued and the issue is resolved. Approval is not instantaneous or guaranteed.

6

Monitor and document what changed

Monitor for the original indicators returning, unexpected administrator accounts, unusual outbound traffic, file changes and new warnings. Keep clean offsite backups and practice a restoration test. Write a short incident summary: cause known or unknown, impact, steps taken, validation evidence, and remaining risks.

4. Four mistakes that make a bad day worse

Tempting shortcutWhy it's riskyBetter approach
Delete every file a scanner flagsFalse positives and dependencies can break a working site; evidence may disappear.Have flagged files reviewed and preserve originals before controlled replacement.
Restore the latest backup and reopen immediatelyThe backup may be infected or the original vulnerability may still exist.Confirm the date, rebuild/patch, rotate access and test before reopening.
Assume a clean WordPress scan clears the hosting accountCompromise can persist outside the WordPress folder or in connected systems.Ask the host/responder to check the wider account and access paths.
Buy a firewall as a substitute for incident responseProtection products cannot retrospectively prove what happened or who had access.Contain, investigate and restore first; then consider monitoring and prevention.

There is a useful real-world example of the third mistake: Wordfence published a 2026 investigation in which a malicious redirect kept coming back because the backdoor survived every WordPress-level cleanup: the persistence mechanism sat at server level, in the hosting control panel's webmail logging. We use that as a reminder about scope—not a claim that every incident behaves that way. Read the original case.

5. A realistic example: the booking-site redirect

Imagine a small appointment-booking website. On Thursday morning, customers start reporting that the mobile homepage opens an unfamiliar website. Its owner recently updated a form plugin. This is a fictional teaching scenario, not evidence against a real plugin.

What a careful owner does: record the first report and affected URL, contact the host to help contain the redirect, retain a host-generated snapshot and logs, identify which staff and services have privileged access, and have the cause investigated. Only after the entry point is closed should the site be rebuilt or restored and key booking workflows retested with dummy information.

What that owner does not do: accuse the newest plugin without evidence, delete random files from the live site, ignore customer data considerations, or declare success because the homepage looks normal once.

One useful document to save right now

The printable worksheet records the time line, affected services, containment, preserved evidence and verification steps. It contains no customer data unless you type it in yourself; it is for offline/local use and should be handled securely.

6. What security products can—and cannot—do

When you're dealing with a possible compromise, the priority is a competent investigation and safe recovery. A subscription can be useful, but none of the tools below is proof that a site is clean. Compare the vendor's current coverage, access requirements, service availability and renewal terms before buying.

For checking suspicious WordPress files

Wordfence

Offers security scanning, firewall capabilities and professional response options. Scanning is evidence-gathering, not a complete forensic guarantee.

Review the official options →
For managed cleanup and firewall services

Sucuri

Relevant if you need a provider offering website incident cleanup plus ongoing protection. Confirm the service scope for your host and stack.

Review the official options →
For independent security advisories

Wordfence Intelligence

Free public vulnerability research to check whether a plugin and its particular version are affected.

Search known advisories →
Free research link, not monetised.
For WordPress risk and maintenance teams

Patchstack Database

Useful for cross-checking advisories and fix releases when investigating a plugin or theme.

Check the database →
Free research link, not monetised.
Commercial disclosure

7. Before reopening, answer these questions

Use this as the sign-off record for your own incident, preferably with the host or security professional who investigated it. If you cannot answer a critical question, do not treat that unknown as a pass.

  • What evidence supports the suspected entry point, and has that weakness been fixed?
  • Have affected credentials, API tokens, keys and privileged sessions been reviewed and changed from a trusted environment?
  • Were core files and third-party components restored from known-good sources, with unexpected administrators and tasks investigated?
  • Have public pages, forms and checkout been checked from a clean device—and has the host reviewed anything outside WordPress where relevant?
  • Are clean, tested backups and an alerting/monitoring owner in place?
  • Have you assessed whether customers, payment providers, regulators or others must be notified under the laws and contracts that actually apply?

If customer records were potentially accessed, legal and notification obligations vary by jurisdiction and the nature of the data. Ask a qualified privacy/legal adviser rather than relying on a generic “always within 72 hours” claim.

Quick answers

Can I fix a hacked WordPress site by reinstalling WordPress?

Not reliably. The infection or access path may be in the database, uploads, themes, plugins, hosting account or connected services. You need to understand and address the cause, then verify the entire relevant scope.

Does restoring an older backup make the website safe?

Only when you know the backup is clean, the vulnerable entry point is closed, affected access has been reviewed and the restored site passes validation. A backup alone is not a security assessment.

What should I do if I cannot log in to wp-admin?

Use your hosting provider's verified support and access-recovery process. Avoid downloading random recovery scripts or granting strangers access. Preserve evidence and escalate where sensitive data or revenue is involved.

Will Google remove the warning automatically?

After the problem is fixed, follow the instructions in Search Console's Security Issues report if Google issued a warning. A review may be required, and clearing can take time. No report does not necessarily mean no compromise.

References and verification

Editorial sources reviewed 19 November 2026. These are public guidance documents; the article is not based on a live forensic examination of a specific WordPress installation.

  1. WordPress.org — My site was hacked
  2. WordPress Developer Handbook — Hardening
  3. WordPress Developer Handbook — Backups
  4. Google Search Central — Search Console and security monitoring
  5. Google Search Central — Malware warnings and review process
  6. Wordfence — A server-level persistence investigation (May 2026)
  7. Sucuri — Responding to connected-account risk (May 2026)

Commercial transparency: this article contains no affiliate links. Product links go to the official vendor pages.

START A CONVERSATION

What are you
building next?

Discuss your project ↗