Contain the immediate problem
If the site is exposing visitors to malicious content, work with your host to restrict access or serve a safe maintenance page. Note the symptoms, affected pages and timing. Coordinate the response with the people who manage the website.
This is an overview of the recovery process. The exact work depends on the installation and the scope of the incident.
Preserve a separate incident copy
Keep a restricted copy of the affected files, database and relevant logs before clean-up changes the evidence. Label it clearly as compromised and keep it separate from trusted backups. It is evidence to inspect, not a recovery image to put straight back online.
Work out what was affected
Review accounts, components and changes across the site. Look beyond the obvious page or file: a compromise may involve database content, scheduled tasks or another site sharing the environment.
Do not treat a particular function name or unfamiliar file as proof on its own. Compare against trusted versions and understand what the code is doing.
Choose a recovery route
A known-clean backup can be useful if you can establish when the compromise began. Otherwise, replacing affected software from trusted sources and carefully reviewing the remaining content may be necessary.
Either route still needs an investigation into the entry point. Restoring the same vulnerable setup can leave the original problem in place.
Remove persistence and address the cause
Review unauthorised accounts, modified files and other ways access might be retained. Update or replace vulnerable components and remove software you no longer need. Obtain WordPress and third-party packages from their official or otherwise trusted distribution sources.
Coordinate credential changes, session revocation and access reviews with the people responsible for the environment. Use a trusted device and a secure handover process.
Test before reopening
Check the public site, administration and important journeys such as enquiries, purchases and email. Review the recovered state with appropriate integrity and security checks. If a provider has issued a warning, follow its review process after addressing the issue.
A clean scan is useful evidence, but it does not by itself prove every problem has been found.
Google warnings: verify the recovery, then request a review
A browser warning, a Security issues report and a manual action are different signals. Record exactly what Google reports and use the corresponding process. A certificate error needs its own diagnosis; clearing caches is not a malware recovery plan.
For a reported security issue, review every issue listed in Search Console and use its sample URLs to guide the investigation. The samples are not a complete inventory of affected pages. Address the reported behaviour throughout the site, close the identified access routes and test the repaired state before requesting a review.
- Record the finding. Preserve the issue details, example URLs and relevant evidence.
- Remediate and verify. Check files, accounts, database content and the public delivery path within the investigation scope. Confirm that the harmful behaviour has been removed.
- Request the appropriate review. Once all listed security issues have been fixed, use Request Review in the Security issues report. Explain the issue, the work completed and how the result was checked.
- Monitor the outcome. Follow Google’s response and investigate any remaining findings. Do not repeatedly submit an unchanged request while a review is pending.
Google controls the decision and timing. Removing a warning does not guarantee that previous rankings or traffic will immediately return. A URL Inspection indexing request is not a substitute for a security review.
We can help with WordPress malware removal and recovery, then Search Console and technical SEO follow-up. Preserve access to your own accounts and agree responsibilities with your host and developers.
Process reference: Google’s Security issues report guidance.
The fuller investigation
The incident report also records suspicious PHP files, unauthorised administrators, core restoration and credential resets. Core checksum and database integrity checks passed, with wider verification still open.
A recovery finding: the redirect was a separate fault
In follow-up work on a previously compromised WordPress site, an ordinary page was returning a permanent redirect to its own address. It was reasonable to investigate the symptom carefully, but the earlier compromise did not establish the cause of this new behaviour.
The response identified Yoast SEO as the redirecting component. Inspection of the site’s rewrite rules then showed a broad category-redirect pattern, (.+)$, sending matching paths into wpseo_category_redirect. In this installation, that rule intercepted a normal page path and produced a redirect back to the same URL.
This was a site-specific routing interaction, not evidence that Yoast was the entry point for the earlier hack. The immediate task was to correct the rule without unnecessarily changing the site’s established URL structure.
A targeted repair, followed by targeted checks
A small must-use plugin filtered out the specific broad category-redirect rule. The generated rules were checked again after a rewrite flush, and the unwanted rule was absent. The existing permalink structure was retained and the category-base setting was returned to its original value.
The affected page and two related category URLs were then requested directly from the origin server with a browser-style user agent. All three returned HTTP 200, with no redirect target reported. The affected page had previously returned a self-referencing 301; the two category URLs were additional checks, not three separately established redirect failures.
What those results established
- The problematic generated rule had been removed.
- The affected page’s direct-origin response changed from a self-redirecting 301 to HTTP 200.
- Two related category URLs also returned HTTP 200 in the direct-origin test.
Those checks established response behaviour for the tested requests. They did not prove that every page, public delivery path or security check had passed. They were not a validation of public TLS certificates, and a successful status alone does not confirm that the page’s content or every function is correct.
Keep the remaining checks visible
A normal published post and the public URL through the edge service still needed explicit verification in the available test record. A previously cached permanent redirect could also make a browser appear to retain the old fault after the origin had changed.
The useful next checks were therefore to verify the public response, test a representative post, review the rendered page and investigate any remaining difference between the origin and the visitor’s route. Cached responses should be checked at the relevant layer rather than cleared indiscriminately.
This distinction is part of a considered recovery: investigate suspicious changes, repair confirmed compatibility faults and record exactly what each test demonstrates. A routing repair is not a malware clearance certificate, and it does not establish how the original compromise occurred.
Technical background: the official WP-CLI rewrite flush documentation explains the regeneration of WordPress rewrite rules. The workaround described here was specific to that installation, rather than a general change to apply to other sites.
Make the next incident easier to handle
Agree who owns updates, monitoring and recovery. Keep protected backups, check that restoration works and limit account access to what each person needs. A practical maintenance routine is more useful than a collection of tools with nobody looking after them.
Document the work completed and any remaining concerns. Security measures reduce risk; they cannot promise a site will never be compromised again.
Further reading: WordPress security hardening ↗ and incident guidance ↗.
Discuss a WordPress recovery
Tell us about your website and what you need. We can work through the options with you.
Explore the service ↗
