Why does my WordPress website get reinfected after cleaning?
The redirects disappeared, then returned. Deleted files reappear, or the hosting provider suspends the website again. Repeating exactly the same clean-up may leave the underlying problem intact. What was corrected needs to be compared with what may have remained accessible or compromised.
WordPressBy Julien BaillyText updated on 5 min estimated read

Key takeaway
A recurrence calls for a broader diagnosis: the scope of the first clean-up, the origin of restored files, accounts still active and other websites on the hosting account. A reassuring scan or a page that displays normally is not enough to conclude that everything is clean.
Distinguish a new infection from a lingering symptom
Start by comparing the two episodes: the same pages, redirect and warnings? Record when the website seemed to recover, which checks were carried out and when the recurrence was first observed. Behaviour visible only on mobile or after clicking a search result deserves a precise description.
Avoid drawing conclusions from a single screen. A Google warning can remain during a review, and the security report provides only a sample of addresses. Equally, a normal display in your browser is not enough to rule out an incident. Ask for a comparison of the technical evidence before and after cleaning, with the limits of the available observations.
Understand what an integrity check verifies
Checksums compare files against a reference. WP-CLI includes a check of WordPress core files against references from WordPress.org. This is useful for spotting differences, but it is not an audit of the database, accounts or the entire hosting environment.
Plugin verification also has a defined scope: it relies on references available in the WordPress.org directory. A private component or a version without a usable reference requires another comparison method. Ask which components were checked and which were excluded. A difference must be examined in context; a legitimate customisation and an injected file should not be interpreted in the same way.
Review the scope of the first clean-up
The initial report is the best starting point. A general statement such as “files cleaned” leaves several questions open: which directories, databases, accounts and redirect rules were examined? Were custom files compared with a known copy? Were website functions tested after replacements?
Ask the person handling the incident to compare these answers with the current symptoms. The aim is to identify unexamined areas, then define checks that could confirm or rule out a lead. This avoids deleting files simply because their names look unusual, risking the loss of useful functionality and evidence.
Check the backup that was restored
A recent backup may contain the same problem as the current website. Its date must be compared with the earliest available evidence, not just the discovery date. Ask where it was stored and what it contains: files and the database are two separate parts of a WordPress restoration.
A new restoration needs an explicit decision. Which version can serve as a base? Which recent data must be recovered separately? Who checks the copy before it goes online? For a store, pay particular attention to the order period to preserve. Record the backups used and the items reintroduced so that a possible new incident can be understood.
Look at access and other websites on the account
Several websites may share a hosting account and access permissions. WordPress notes that a compromise on a shared server can expose other websites too. Ask your provider to clarify the actual isolation of files, processes and databases, and the scope they checked.
Also have valid access and components maintained in the environment checked. A test copy or a forgotten old installation should be included in the inventory. Updates, permissions and access separation must be considered across the affected environment. A neighbouring website showing no symptoms is not enough to treat it as a clean reference.
Decide between repair and rebuilding
The right choice depends on what can be verified. A targeted repair may be suitable if the scope is understood and the components have reliable references. When the environment itself is suspect or the state of files can no longer be established, ask your hosting provider or system administrator about a rebuilding scenario.
Compare the two proposals on concrete points: items retained, data to migrate, checks on that data, planned downtime and responsibilities. Copying an entire suspect environment to new hosting does not demonstrate that it is clean. The decision should explain what will be rebuilt from a trusted source and what needs analysis before reuse.
Define checks after the work
To compare checks, I recommend a record for each anomaly: initial symptom, action taken, check carried out and point still to examine. For example, a redirect that has disappeared can be marked as fixed in the test performed while its cause remains unconfirmed. This avoids turning a limited observation into a conclusion about the entire website.
The clean-up should leave a useful record: scope covered, changes made, accounts checked, unresolved points and check dates. Agree on a follow-up period and method appropriate to the case, without treating that follow-up as a guarantee against all future attacks.
Ask three questions before closing: how will we recognise the problem returning, who receives the alert and who can act? Also prepare functional checks, such as a contact enquiry or test order. If the problem returns, this record will let you start from established facts and target areas that remain uncertain.
Sources and references
Documentation consulted when writing this guide. Advice and procedures should be adapted to your own context.
