Massive Joomla File Infection: How to Restore a Site Without a Backup
A typical scenario: a virus got onto the site and infected all PHP files — it added a malicious line to the beginning of each. Manually removing it from hundreds of files is impossible. There is no backup. We have restored more than 40 sites after a massive infection without a backup and we know how to act systematically. Let us look at a step-by-step plan.
Why Manual Removal Will Not Work
When hundreds of files are infected, manual cleaning is pointless:
- It takes weeks.
- It is easy to miss an infected file.
- The virus will come back from the remaining copies.
- The risk of deleting legitimate code is too high.
A systematic approach is needed: first stop the spread, then restore the files from reference sources, and afterwards check for residual infection.
Where to Start
First of all, put the site into maintenance mode and make a copy of the current state. Even an infected copy is a rollback point if something goes wrong.
Then determine the scale of the infection: how many files were changed, which file types are affected, whether there is infection in the database. This will help choose a restoration strategy.
A Restoration Strategy Without a Backup
Restoration is based on replacing the infected files with reference versions:
- The Joomla core — download the original distribution of the same version.
- Extensions — download the official versions from the Joomla directory.
- The template — download the original from the developer.
Files that are not in official sources — images, documents, custom edits — are checked and cleaned manually.
What Must Be Checked
Even after replacing the files, check:
- The database for malicious records.
- The folders with uploaded files.
- The configuration files.
- The user accounts.
- Hidden files in non-standard locations.
Special Cases
If files are infected that you cannot restore from official sources:
- Custom components written to order.
- Modified templates.
- Integrations with external services.
These files must be cleaned manually — fragment by fragment. The work is long and requires experience, but without it the site will not be clean.
How Long Restoration Takes
A massive infection without a backup is one of the most labor-intensive cases. Typical timeframes:
- A simple massive core infection: 2–3 days.
- An infection with custom files: 3–5 days.
- A complex case with database infection: 5–7 days.
This is longer than a regular cleanup but faster than a full reinstall from scratch.
"Without a backup restoration is possible, but it is always longer and more expensive than prevention. Make the next backup right after the cleanup."
If the site is massively infected and there is no backup — do not try to clean it manually. Professional restoration from reference sources is faster and safer. The Virus Removal service includes diagnostics, restoration from reference sources and database cleanup. If there is a lot of data and it is damaged — we connect Recovery After a Hack. And after the cleanup we be sure to set up Security and Firewall so this does not happen again.