# Hacked WordPress: 10 Essential Steps for Safer Recovery

Source: https://hostreta.com/2026/10/hacked-wordpress-recovery/

In this guide: How to fix a hacked WordPress site step by step: the first 30 minutes, backing up the hacked state, cleaning or restoring, closing the vulnerability, and…

Discovering your website has been hacked is stressful. Your site may be redirecting visitors, showing spam, or flagged by Google. The key is to act methodically: contain the damage, clean or restore, close the hole, and recover your reputation.

Here’s the step-by-step process.

Table of Contents

[Toggle](#)

- [Initial response: establish scope](#Initial_response_establish_scope)
- [Backing up the hacked WordPress state](#Backing_up_the_hacked_WordPress_state)
- [Cleaning or restoring](#Cleaning_or_restoring)
- [Closing the vulnerability](#Closing_the_vulnerability)
- [Requesting a Google review](#Requesting_a_Google_review)
- [After hacked WordPress recovery](#After_hacked_WordPress_recovery)
- [Key Takeaways: Fix a Hacked WordPress Site](#Key_Takeaways_Fix_a_Hacked_WordPress_Site)
- [1. Hacked WordPress triage: facts before assumptions](#1_Hacked_WordPress_triage_facts_before_assumptions)
- [2. Hacked WordPress containment needs a safe control plane](#2_Hacked_WordPress_containment_needs_a_safe_control_plane)
- [3. Preserve the hacked WordPress state securely](#3_Preserve_the_hacked_WordPress_state_securely)
- [4. Choose a hacked WordPress recovery route](#4_Choose_a_hacked_WordPress_recovery_route)
- [5. Validate a candidate backup before overwriting production](#5_Validate_a_candidate_backup_before_overwriting_production)
- [6. Rebuild trusted code without deleting evidence blindly](#6_Rebuild_trusted_code_without_deleting_evidence_blindly)
- [7. Hacked WordPress access review extends beyond passwords](#7_Hacked_WordPress_access_review_extends_beyond_passwords)
- [8. Close the entry route and reduce reinfection risk](#8_Close_the_entry_route_and_reduce_reinfection_risk)
- [9. Verify hacked WordPress recovery with business checks](#9_Verify_hacked_WordPress_recovery_with_business_checks)
- [10. Communicate hacked WordPress status accurately](#10_Communicate_hacked_WordPress_status_accurately)
- [Illustrative hacked WordPress incident record](#Illustrative_hacked_WordPress_incident_record)
- [Services to evaluate for recovery and maintenance](#Services_to_evaluate_for_recovery_and_maintenance)
- [Hacked WordPress handover: keep the next administrator informed](#Hacked_WordPress_handover_keep_the_next_administrator_informed)

## Initial response: establish scope

1. Confirm the hack.

Look for redirects, defaced pages, spam content, browser warnings, unknown admin users, or a security alert from your host or Google.

2. Contact your host.

Tell them what you’re seeing. Many hosts have security teams, malware scanners, and backups that can help — and they may need to know if your account is sending spam or attacking others.

3. Put the site in maintenance mode (if possible).

Containment must be implemented through a trustworthy layer. A maintenance plugin alone may not stop malicious files, alternate routes or server tasks. Ask the host for an appropriate restriction while preserving authorized recovery access.

4. Change critical passwords — from a clean device.

- Hosting account and control panel

- SFTP/FTP and SSH

- Database user (update wp-config.php afterward)

- All WordPress administrator accounts

- Email accounts connected to the site

Enable 2FA wherever possible. If your own computer might be infected, scan it first or use another device.

5. Log out all users — changing the security keys in wp-config.php (the “salts”) forces everyone to log in again.

## Backing up the hacked WordPress state

Before changing files, take a full backup of the infected site (files and database) and label it clearly. You may need it to:

- Investigate how the attack happened.

- Recover content that was changed after your last clean backup.

- Provide information to a security professional.

Store it separately from your clean backups so you never restore it by accident.

## Cleaning or restoring

Option A — Restore a verified recovery point

- Establish the earliest known indicators using available evidence. File timestamps and the first visible symptom do not reliably prove when compromise began.

- Restore a backup from before that date.

- Recreate any legitimate content added since then.

- Update everything immediately after restoring — the original vulnerability still exists in the backup.

Option B — Clean manually

- Replace WordPress core: download a fresh copy of the same version and replace wp-admin and wp-includes (and root core files except wp-config.php). You can also run wp core verify-checksums to find modified core files.

- Reinstall plugins and themes from official sources — delete the old folders and install fresh copies. Remove any you don’t use.

- Inspect /wp-content/uploads/ for PHP files or other files that shouldn’t be there.

- Check wp-config.php and .htaccess for injected code or redirect rules.

- Clean the database: search posts, options, and widgets for injected scripts, iframes, and unknown links. Remove unknown admin users.

- Check scheduled tasks (cron) for malicious jobs.

- Scan again with a server-side scanner and remote scanner.

Option C — Professional cleanup

If the infection is complex, persistent, or you’re not comfortable editing files, hire a professional malware removal service or use your host’s cleanup service.

## Closing the vulnerability

If you don’t fix how attackers got in, you’ll likely be hacked again.

- Update WordPress core, all plugins, themes, and PHP.

- Remove nulled, abandoned, or vulnerable plugins and themes.

- Review users: delete unknown accounts, reduce unnecessary admin roles.

- Enforce strong passwords and 2FA.

- Install a security plugin or WAF — see [Best WordPress Security Plugins](https://hostreta.com/2026/10/best-wordpress-security-plugins-compared/).

- Disable file editing in the dashboard (DISALLOW_FILE_EDIT).

- Check file permissions.

- Review access logs (if available) to identify the entry point — suspicious POST requests to specific plugin files often reveal the vulnerability.

- Follow the full [WordPress Security Checklist](https://hostreta.com/2026/10/wordpress-security-checklist/).

## Requesting a Google review

If Google flagged your site:

- Open Google Search Console → Security issues.

- Confirm the issues are fixed and your site is clean.

- Click Request review and explain what you found and what you did to fix it.

- Review timing varies. Follow the status shown in Search Console rather than promising a fixed completion date.

Also:

- Remove spam URLs from Google’s index — make sure they return 404/410 and use the Removals tool for urgent cases.

- Resubmit your sitemap.

- Check other blacklists and request delisting if needed.

- Warn customers if their data may have been exposed, and follow applicable legal notification requirements.

## After hacked WordPress recovery

- Monitor your site daily for the next two weeks.

- Keep automatic daily off-site backups.

- Scan weekly.

- Document what happened and how you fixed it.

Further reading: [official WordPress documentation](https://wordpress.org/documentation/article/faq-my-site-was-hacked/)

## Key Takeaways: Fix a Hacked WordPress Site

- Contain first: contact your host, change passwords, and protect visitors.

- Back up the hacked state separately before cleaning.

- Restore a clean backup or replace core, plugins, and themes with fresh copies.

- Find and fix the vulnerability to prevent reinfection.

- Request a Google review once clean.

## 1. Hacked WordPress triage: facts before assumptions

A browser warning, an unfamiliar administrator or an unexpected redirect is a reason to investigate, not a complete explanation of the incident. Record the exact symptom, affected hostname, time and how it was observed. Compare a second trusted device if appropriate, without repeatedly exposing visitors to a potentially harmful page. Do not click suspicious downloads or enter credentials into a page whose integrity is in doubt.

For a hacked WordPress investigation, separate confirmed facts from hypotheses. An unknown account may be unauthorized, but confirm whether it belongs to a legitimate integration or administrator before removing it. A changed timestamp may reflect a normal deployment. Preserve relevant evidence and ask the host what logs remain available. Do not announce an entry point simply because one suspicious request appears near the time of a visible failure.

## 2. Hacked WordPress containment needs a safe control plane

Use a trusted device and a known route to contact the host. Avoid signing in through a link supplied by an unexpected security email. Explain which services appear affected and ask whether the account has been restricted or whether other applications share its credentials. The response may involve hosting-level restrictions, temporary isolation or assistance from an incident specialist. The right choice depends on the actual environment.

Keep containment and evidence preservation coordinated. Disconnecting a service may protect visitors while also interrupting sales or access to useful logs. Record who approved the action and how authorized staff can still perform recovery work. A hacked WordPress site with suspected payment-data or personal-data exposure may need specialist incident response. Do not assume that a generic cleanup checklist satisfies contractual or notification obligations.

## 3. Preserve the hacked WordPress state securely

Capture relevant files, database material and available logs through a controlled process before destructive changes where practical and safe. Label the copy as potentially malicious and keep it separate from usable recovery points. Restrict access to authorized people. The archive may contain credentials, personal information or executable malware; it is not an ordinary file to email to every developer who offers help.

Record when the capture was made, which system produced it and any gaps in coverage. If an insurer, payment provider or investigator may require evidence, follow their preservation instructions before modifying it. Do not open unknown executable files to inspect their behavior on a normal workstation. A hacked WordPress archive is evidence for qualified analysis, not a guarantee that the original cause can be reconstructed completely.

## 4. Choose a hacked WordPress recovery route

A clean rebuild, a reviewed restoration and a careful cleanup are different options. Consider the scope of compromise, quality of backups, trust in the environment and importance of recent transactions. If hosting credentials or server-level access may be compromised, replacing WordPress files alone may leave the attacker another route back. Ask the provider to assess the broader account rather than treating the website directory as the whole incident.

The [WordPress hacked-site FAQ](https://wordpress.org/documentation/article/faq-my-site-was-hacked/) provides an official starting point. Use a qualified professional when the infection persists, the evidence is unclear or business-critical data is involved. A hacked WordPress recovery is not complete merely because a scanner stops displaying a warning. Define the chosen scope, validation steps and remaining uncertainty before calling the site ready to reopen.

## 5. Validate a candidate backup before overwriting production

Check whether the recovery point predates known indicators, but do not mistake that for proof that it predates the compromise. Restore into an isolated environment where appropriate and review the files, accounts and relevant configuration. Prevent the test copy from sending customer emails or triggering live payments. A copied database may contain both legitimate transactions and malicious changes that need separate analysis.

Document what newer content or orders would be lost if that recovery point replaced production. Coordinate any reconciliation with the responsible business and technical owners. Do not improvise a database merge on a live store. See the [automatic backup recovery guide](https://hostreta.com/2026/10/automatic-backups/) for the distinction between owning an archive and having a usable, tested recovery process.

## 6. Rebuild trusted code without deleting evidence blindly

Obtain WordPress, plugins and themes from their official distribution sources or the legitimate vendor. Verify compatibility and preserve legitimate custom work before replacing directories. A checksum comparison can help identify changes to supported distributed files; it does not establish that the database, configuration or every third-party component is clean. Unknown custom files need review rather than an automatic assumption that every unfamiliar filename is malicious.

For hacked WordPress cleanup, assess must-use plugins, scheduled tasks, uploads, configuration and database content as well as ordinary plugins. Avoid publishing malicious payloads or customer records in a public support request. Keep a change record showing what was replaced, removed or preserved and why. If a component has no trustworthy source or supported update path, plan a safe replacement rather than reinstalling the same unverified package.

## 7. Hacked WordPress access review extends beyond passwords

Review hosting access, registrar access, email recovery routes, application users, API keys and integrations according to the suspected scope. Changing a password may not revoke every active session or token. Follow each service’s documented revocation process, and coordinate rotations so dependent jobs can be updated safely. Perform sensitive steps from a trustworthy environment so newly issued credentials are not immediately exposed again.

Check the [WordPress role assignments](https://hostreta.com/2026/10/wordpress-user-roles/) against known business responsibilities. Remove confirmed unauthorized access and reduce unnecessary privileges, preserving required evidence first. Use the [team password manager workflow](https://hostreta.com/2026/10/password-manager-guide/) for controlled ownership and handover. Do not share a replacement administrator password with everyone who previously used the compromised account.

## 8. Close the entry route and reduce reinfection risk

Identify supported fixes for the relevant software or configuration weakness. If the original route remains uncertain, say so and broaden the review rather than inventing a single cause. Updating software, removing abandoned components and enforcing appropriate authentication are complementary actions. A new security plugin does not automatically remove persistence already present elsewhere in the account.

A [web application firewall](https://hostreta.com/2026/10/waf-guide/) may reduce exposure to certain incoming requests while remediation proceeds, but it does not repair vulnerable code or clean stored data. Keep the [update process](https://hostreta.com/2026/10/wordpress-updates/) controlled and verify the result. Repeated hacked WordPress incidents are a reason to reassess the scope, credentials and trust boundary, not to run the same superficial cleanup indefinitely.

## 9. Verify hacked WordPress recovery with business checks

Review representative public pages, administration access, forms and important integrations after the technical work. Check for unexpected redirects under different legitimate access paths, unauthorized users and recurring file changes. Compare logs and scanner findings within their stated scope. No single clean scan proves that every possible compromise has been excluded. Preserve a dated record of the checks performed and any areas not examined.

Reopen services through an agreed plan and monitor closely for recurrence. Choose a monitoring period based on the incident and business risk rather than assuming that exactly two weeks settles every case. Confirm that failure alerts reach a responsible person and that known malicious routes no longer expose harmful content. Keep [the security review record](https://hostreta.com/2026/10/website-security-review/) connected to the recovery ticket.

## 10. Communicate hacked WordPress status accurately

Tell customers what is confirmed, which service is affected and when they can expect the next update if one is appropriate. Do not state that payments, passwords or personal information were safe until the responsible investigation supports that statement. Avoid public speculation about the attacker or a vendor’s fault. Follow an agreed communication process and obtain qualified advice where a notification obligation may apply.

For search warnings, consult the actual Security Issues report and request review only after addressing the identified problem. Removing a search result temporarily does not remove malicious content from the server. Handle confirmed spam URLs according to their actual state and search guidance. The [crisis communication guide](https://hostreta.com/2026/10/crisis-communication/) provides a practical structure for updates without inventing a recovery deadline.

### Illustrative hacked WordPress incident record

A small business can record the first observed symptom, current containment, preserved evidence, chosen recovery method, access rotations, validation results and unresolved questions. Assign an owner to each open item. Mark a task complete only when evidence supports it. This is an example of a record to create, not a report that Hostreta investigated or cleaned your website.

After recovery, review how the problem was detected and which operational gaps delayed the response. Improve backup tests, access ownership and software maintenance without claiming that the site is now impossible to compromise. Preserve useful lessons in a runbook that another authorized person can follow. A hacked WordPress incident should lead to clearer responsibilities, not merely a new collection of plugins with overlapping dashboards.

### Services to evaluate for recovery and maintenance

Promotional recommendation: consider [KAWEDMA’s website development and hosting services](https://kawedma.com/) when you need a scoped maintenance or recovery discussion. Confirm whether investigation, cleanup, backups and ongoing monitoring are included in the proposed service. No recovery time, forensic outcome or complete protection is guaranteed by this recommendation.

Affiliate disclosure: Hostreta may earn a commission if you purchase through this link. If a hosting change is independently justified after your incident review, compare [hosting.com’s managed WordPress service](https://my.hosting.com/aff/08a016e41d3100e5460ff6ebee1b5e0a91e643d6). Verify current security responsibilities and migration terms. Moving a hacked WordPress site without assessing its files and database can carry the same problem into the new environment.

Hacked WordPress: contain and preserve. Original explanatory diagram.

Hacked WordPress: choose recovery. Original explanatory diagram.

Hacked WordPress: verify before reopening. Original explanatory diagram.

### Hacked WordPress handover: keep the next administrator informed

At the end of the work, hand over a concise record rather than an unsupported claim that everything is clean. Include the components reviewed, trustworthy sources used for replacement code, recovery point chosen, accounts examined and outstanding actions. Keep sensitive evidence in a restricted location and tell the receiving administrator how authorized access can be requested. Do not attach a potentially malicious archive to a routine handover email.

For a hacked WordPress incident, the handover should also identify what was not established: the original entry route, earliest compromise date or extent of data access may remain uncertain. Those gaps matter for future decisions. Agree on who watches alerts, who responds to a recurring symptom and when the recovery plan will be reviewed. Keep the customer’s operational needs visible alongside technical checks. A successful handover makes the ongoing hacked WordPress recovery responsibilities explicit and prevents unfinished tasks from disappearing when a contractor’s work ends.
