WEBSITE RECOVERY
WordPress Malware Keeps Coming Back: Find the Cause
Recurring WordPress malware usually means that an access route, persistence mechanism or contaminated recovery source remains unresolved. Compare what changed between cleanup and recurrence, then remove the mechanism that recreates the infection rather than repeatedly deleting its visible output.

Establish what actually came back
Keep a before-and-after record of the suspicious file, database value, account or redirect. Include hashes where your investigator can collect them safely, the time it was detected and the action taken. A filename alone is insufficient: an attacker can change the name, and a legitimate deployment can recreate an expected file.
First separate a fresh malicious change from a stale cache, an old scanner report or a historical search snippet. Compare the live origin, public cached response and the actual affected content. Record the timezone used by each log. Conflicting timestamps can make a routine deployment look like reinfection or hide the sequence of an attack.
Use the recurrence timing to guide the investigation
| When the problem returns | Hypothesis to investigate | Evidence to seek |
|---|---|---|
| Immediately after the first page request | A remaining loader or injected application hook | Changes created during that request and the code paths loaded. |
| At a regular interval | A scheduled task or external automation | Application schedules, hosting cron entries and deployment jobs. |
| After an update or restore | A contaminated source or package | The exact archive, source repository and restore record. |
| After a successful account login | Compromised user or deployment access | Authentication and account activity correlated with file changes. |
| Only at the public edge | Cached content or an altered edge rule | Origin and CDN response comparison and rule audit history. |
These are working hypotheses, not diagnoses. More than one route can exist. Do not delay containment while trying to make every event fit one explanation, and avoid destroying logs simply because the first cleanup appeared to succeed.
Review code that ordinary plugin checks miss
Inventory the components that run before the affected page renders: normal plugins, must-use plugins, drop-ins, theme bootstrap code, custom snippets and relevant server configuration. Review stored application settings and scripts as well as files. A dashboard list of active plugins is not a full map of what the PHP process may execute.
WordPress publishes checksum-verification tools for core and supported plugin packages. They can help identify differences against publisher files, but their coverage must be understood. A clean core result does not validate custom code, uploads, database content or an account login. A premium or bespoke component may need comparison with its own authenticated release source.
Run investigation tooling from a trusted administrative environment. Avoid casually bootstrapping a known-compromised application just to produce a list. If examining a copy, keep it isolated and prevent it from contacting production integrations or handling normal customer traffic.
Close every relevant path that can write the malware back
- Review hosting users, SSH or SFTP access, CMS administrators, recovery email access and deployment credentials.
- Audit scheduled hosting jobs, external deployment services and backup/restore automations against a documented owner.
- Investigate neighbouring websites that share writable directories or a hosting account; a clean main domain may be recontaminated by another application.
- Replace affected components from verified sources and remove abandoned code rather than leaving it disabled but reachable.
- Review the identified initial access condition and its fix. An unknown cause must remain an open item, not be relabelled as a completed root-cause investigation.
If host-level control may have been lost, a fresh application directory on the same compromised server is not a trusted rebuild. Decide with the hosting provider whether the account, operating system or wider environment also needs replacement. Separate recovery credentials from old automation until that trust decision is made.
Restore in controlled stages and watch what changes
- Establish a clean baseline from verified code and reviewed data, with file inventory and configuration recorded.
- Enable the minimum features needed for one business journey and observe unexpected file writes, outbound connections and account changes.
- Reintroduce necessary integrations one at a time, with their credentials replaced where exposed and their owners identified.
- Exercise scheduled functions and background work deliberately, then compare the application with the recorded baseline.
- Monitor public behaviour and relevant logs after reopening, with an agreed owner for investigating alerts and a documented escalation route.
Do not deliberately leave a vulnerable production component online to see whether an attacker returns. Observing a rebuild in a restricted test environment is different from allowing further public compromise. Keep customer data out of test copies unless there is a defined need and appropriate protection.
What an evidence-led recurrence report looks like
Hypothetical example: a business removes the same injected file three times. Each return appears just after a scheduled deployment. Comparing the deploy archive with the clean baseline reveals that an old, already infected build is being republished. The team repairs the build source, replaces its deployment credentials, investigates how that source was changed and retests the schedule. The file deletion was necessary, but the deployment chain was the recurring cause.
Ask a WordPress reinfection recovery provider for the sequence of events, tested hypotheses and outstanding gaps. A useful report says which code, accounts and automations were reviewed and how recurrence will be detected. It should not equate a quieter scanner dashboard with proof that the attacker never accessed customer data.
CyberXperts can help scope recurring website malware and distinguish application cleanup from a wider hosting or identity problem. An initial enquiry needs the symptoms and hosting context, not unrestricted credentials or a public link to a compromised backup.
Frequently asked questions
Can a backup restore bring malware back?
Yes, if the recovery point already contains malicious code, an unauthorised account or an unsafe component. Treat backup dates as clues rather than proof of cleanliness. Inspect a candidate in isolation and repair the access route before reopening the restored site.
Does a clean WordPress checksum result prove the site is clean?
No. A checksum comparison only covers the files and package source included in that check. It does not independently validate all custom code, database values, external script accounts or hosting access. Use it as one piece of a broader integrity assessment.
Should I keep reinstalling security plugins?
Repeated tool changes can obscure evidence and introduce more configuration work. First establish what recreates the malware and who can modify the application. Keep a small, understood set of tools and make their coverage and limitations explicit in the response plan.
Why does malware return after changing my WordPress password?
The attacker may retain another administrator, a hosting session, deployment access or executable persistence. Alternatively, a contaminated automation may restore the files. Rotate credentials in a trusted environment and revoke relevant sessions and alternate access, rather than changing only one password.
When is a clean rebuild the better option?
Consider rebuilding when the scope cannot be bounded, trustworthy code cannot be established or the hosting environment may itself be compromised. Preserve evidence and plan safe data migration first. A rebuild must also replace the compromised access or process, or the new system may be exposed again.
Sources and further reading
Official documentation and advisories supporting the technical points above. The recovery workflows and examples are editorial guidance for adapting to your own systems.
- WordPress CLI: Verify core checksums — accessed 22 October 2026
- WordPress CLI: Verify plugin checksums — accessed 22 October 2026
- WordPress: Editing wp-config.php — accessed 22 October 2026
Get practical support for your next step.
Tell CyberXperts what happened, which systems are affected and what you have already checked. Do not include passwords or sensitive incident evidence in the initial form.
Discuss your website security