Website Maintenance & Hosting
WordPress Broke After Your Host Removed Malware? Recover Files Without Restoring the Infection
A site that breaks after automated cleanup needs evidence-led file reconstruction. Review the cleanup history, distinguish infected originals from clean recovery sources, and restore business functions without undoing the security work or losing newer records.

In this guide
If WordPress stopped working immediately after your host removed malware, obtain the cleanup history before restoring files. The failure may involve a legitimate file that was altered, a file whose contents were removed, or a malicious dependency that the website had started relying on. Recover trusted functionality rather than restoring every pre-cleanup file.
Keep two questions separate: what prevents the website from working, and whether unauthorized access remains. A repaired homepage does not establish a clean site, and a scanner reporting no remaining detection does not establish that every business function works.
Ask the host for a specific cleanup record
Request the cleanup time and timezone, affected paths, detection reasons, actions taken and available before-and-after records. Ask which product performed the cleanup and whether the host made additional manual changes. “Malware removed” is too broad to explain a missing checkout, broken theme or fatal error.
Imunify360’s administrative documentation distinguishes cleaned files, removed content and restoration options. It also describes a setting that can leave certain malicious files at zero size. Those possibilities help explain why a path can still exist while its expected code is absent; they do not prove your host used a particular setting.
- Record the first broken page or action and its exact error.
- Identify whether public pages, the dashboard and scheduled processes fail in the same way.
- Preserve current files, database and cleanup records in protected storage.
- Note orders, enquiries or content created after any proposed backup date.
- Agree who controls further cleanup and recovery changes so actions do not conflict.
Do not repeatedly restore the entire account while the host’s scanner continues removing the same files. That can destroy the evidence trail and reintroduce the infection.
Map the failure to a file or dependency
The owner can provide affected addresses, screenshots and the last known successful business action. The developer or host should inspect the corresponding application error, file state and recent cleanup events. Avoid displaying detailed server errors publicly.
A missing theme file suggests a different repair from a removed must-use plugin or an empty configuration include. Compare the exact path with the expected component package. If a custom function disappeared, determine whether it was legitimate custom work, injected code, or both within the same file.
Use a short decision sequence:
- A standard component file is missing or altered: obtain its trusted package and plan a compatible replacement.
- A custom file is affected: compare version control or a reviewed clean backup; reconstruct necessary functionality if trust cannot be established.
- The removed file is wholly malicious: do not restore it to silence the error; remove the dependency that calls it.
- The error persists without a matching cleanup event: inspect permissions, configuration and unrelated failures rather than assume the scanner caused everything.
Our WordPress critical-error guide covers general failure isolation. Here, the cleanup history is the additional evidence that should guide reconstruction.
Understand what “restore original” would restore
In the cited Imunify360 documentation, restoring the original file before cleanup is distinct from attempting restoration from a backup preceding infection. The original may contain the material that was detected. Have the host explain the source and trust level before using any restoration action.
The same documentation notes that old quarantine and delete actions were removed from current workflows. Do not assume a tutorial’s quarantine restore button exists in your host’s installed version. Available recovery depends on product version, host configuration, retention and actual backups.
ImunifyAV documentation describes action history and file statuses across supported control panels. A retained historical entry can identify what happened even when the original content is no longer available. Ask for evidence rather than a promise that every removed file can be recovered.
Replace components from trusted sources
For ordinary WordPress core, plugin and theme files, use verified official or legitimate vendor packages. Match compatibility and preserve reviewed custom work. Replacing a complete affected component may be more reliable than guessing which line a scanner removed, but it still needs a backup and testing plan.
Do not overwrite the uploads directory or business database as part of a routine plugin replacement. If a full backup restore is necessary, assess its date and infection status, then reconcile later orders and submissions. Our backup-after-hack guide covers that broader recovery decision.
At the same time, close the original access route where it can be established. Review affected credentials, unauthorized accounts and persistence according to the incident evidence. Adding suspect files to an ignore list merely to stop repeat detections is not a trust assessment.
Validate security and business recovery separately
Ask the responder for a file-replacement record, updated component versions, findings on persistence and any unresolved evidence limits. Then test normal customer and staff workflows: page rendering, login, form delivery, uploads if used, checkout if present, and required background tasks.
Check one fresh business record from creation through its intended destination. Review application logs after the test. Our cleanup, audit and maintenance guide helps define which follow-up work remains when immediate repair is finished.
The handover should explain what made the site fail, how trusted functionality was restored, and what monitoring or further investigation is still assigned. Avoid treating an attractive homepage as the final acceptance test.
FAQs
Did the host necessarily delete a legitimate file?
No. The site may have depended on malicious code, a mixed file may have been cleaned, or another fault may be present. Compare the error with cleanup history and trusted packages.
Should I click Restore original to make the site work?
First establish what the action restores. The pre-cleanup original can contain the detected infection; a verified clean backup or trusted package is a different recovery source.
Can an empty PHP file explain a fatal error?
It can if required functions or classes were expected there. A developer should verify the dependency and reconstruct the trusted component instead of assuming every empty file is safe or malicious.
Is a clean scan enough to reopen the shop?
It is one check. Verify checkout and business records, investigate the original access route, and document the limits of the security review before declaring recovery complete.
Sources
- Imunify360: malware scanner actions, history and restoration
- ImunifyAV: file and cleanup history documentation
Prepared for website owners by Nithu / Suthakaran Nithursan. Dated advisory facts link to primary sources. Examples are illustrative and are not client results or guarantees.