Restore WordPress security after a hack by investigating the entry point, removing malicious access, updating vulnerable software and monitoring for reinfection.
A hacked WordPress site can look clean after malicious files are deleted and then become infected again days later. That usually means the original route into the site was never closed. Recurring malware is a security investigation problem, not simply a file-deletion problem. The goal is to establish what changed, remove malicious persistence and reduce the chance that stolen credentials or vulnerable software can be reused.
Before making broad changes, take a copy of the affected site and relevant logs if they are available. A compromised backup is not a clean restore point, but it can still help establish what happened. Avoid overwriting every historical backup with the current infected state. If the incident is fresh, our first-hour hacked-site checklist outlines the immediate priorities.
Attackers may add administrator users, scheduled tasks, modified plugins, unfamiliar PHP files or injected database content. Deleting the file that triggered a scanner alert may leave another mechanism able to recreate it. Compare core files against known versions, review administrator accounts and inspect recently modified files in context. A proper cleanup should explain why the infection stopped, not merely report that a scan is currently clear.
Identify outdated core, plugins and themes, especially components with known security fixes. Remove software that is no longer required. If a plugin has been abandoned by its developer, updating WordPress around it does not remove the risk. Replace unsupported components carefully, because changing a live theme or builder without testing can damage the site’s layout.
Change WordPress administrator passwords and review hosting, SFTP, database and control-panel access where relevant. Remove old users rather than leaving dormant privileged accounts. If email accounts are used for password recovery, secure those as well. Coordinate credential changes with containment and cleanup. Revoke known-compromised access promptly from a trusted device, then review credentials again after remediation so a remaining malicious process cannot keep using or capture them.
Shared hosting accounts sometimes contain several WordPress installations. Cleaning only the public site while an abandoned staging copy remains vulnerable can lead to reinfection. Inventory other domains, subdomains and old installations under the same account. Remove what is genuinely unused and update what must remain.
If Google or browsers flagged the site, confirm the site is clean before requesting review. Search for injected pages and spam titles, check Search Console security messages if available, and make sure redirects are gone. Our Google blacklist recovery guide covers the sequence without encouraging premature review requests.
Watch file changes, login activity and security alerts for a period after remediation. Verify backups are running and keep at least one known-good recovery point. Test forms and key pages because cleanup can occasionally remove legitimate files that had been modified alongside malware. Our article on recurring WordPress malware provides additional diagnostic questions.
If reinfection continues, the site hosts payments or sensitive customer data, or several installations share the account, further trial-and-error can make the investigation harder. TempWebz offers WordPress malware removal and technical support focused on restoring a stable site without unnecessary redesign.
Keep a record of each finding, its location, the evidence supporting it and the action taken. Distinguish a confirmed malicious change from an unexplained difference. A modified theme file may contain legitimate customisation; deleting it without review can break the site without improving security. Preserve a recoverable copy and ask the responsible specialist to explain uncertain findings.
Use trusted release packages and documented comparison methods for core, themes and plugins. Avoid downloading a replacement from an unknown source simply because its filename matches. The Australian Government’s website security guidance provides a useful baseline for supported software, access protection and backups alongside the incident-specific investigation.
A clean restore may bring the site back online, but it does not establish how the attacker entered. Record what you know about the vulnerable component, exposed account or other route, and identify anything still uncertain. If the cause remains unknown, continue the investigation rather than treating a successful page load as final closure.
For example, restoring a week-old copy while leaving the same unsupported public plugin in place can preserve the original weakness. The recovery plan needs both a usable website and a correction for the identified exposure. Test replacements or updates so that security work does not unexpectedly alter forms, payments or the site’s established appearance.
Check representative pages, search results, redirects and important forms after remediation. Review newly created accounts and unexpected file changes with the person responsible for security. Some malicious behaviour appears only for particular visitors or entry points, so a single homepage visit is limited evidence.
Keep alerts actionable. Assign someone to review significant findings and document how they resolve them. Preserve useful logs according to the incident plan and protect customer information when sharing evidence with support providers. Do not publish raw configuration files or credentials in a public forum.
A clear handover lists the confirmed findings, fixes, software updates, access reviews, recovery point and remaining risks. State the scope of the checks rather than promising that no attack can ever recur. If the incident may involve customer information or payment systems, obtain appropriate specialist advice about the response.
Continue routine maintenance after the immediate cleanup. Supported software, controlled access and tested recovery reduce avoidable exposure, but they do not create an absolute guarantee. The useful outcome is a working site with a documented cause where possible and a credible plan for anything unresolved.