How to Recover a Hacked Joomla Site

⏱ 5 min read 128 Updated April 23, 2026
How to Recover a Hacked Joomla Site

Even with strong security, any website can get hacked. When your Joomla site is compromised, quick and structured action is the key to recovery. This guide walks you through the steps to clean, restore, and secure your hacked Joomla website safely.

1. Identify the Signs of a Hacked Joomla Site

First, confirm whether your site is actually hacked. Common indicators include:

2. Put the Site in Maintenance Mode

Prevent further damage or data theft by taking the site temporarily offline:

  1. In Joomla, go to System → Global Configuration → Site.
  2. Set Site Offline to “Yes”.
  3. Or use an .htaccess rule to allow only your IP during cleanup:
Order deny,allow
Deny from all
Allow from 123.123.123.123

3. Back Up the Infected Site (Before Cleaning)

It might sound strange, but you should always back up the hacked version before making changes. This allows forensic analysis later if needed.

4. Scan for Malware and Modified Files

Next, identify which files were compromised:

5. Compare Against a Clean Joomla Installation

Download the same Joomla version from the official website. Compare your current installation using a diff tool or command line:

diff -rq /var/www/html /var/www/clean-joomla/

Replace any modified or unknown core files with originals from the clean version.

6. Restore from a Clean Backup (If Available)

If you have a recent, verified backup (via Akeeba Backup), restoring it is the fastest and safest method. Make sure to:

7. Clean the Database

Sometimes hackers insert malicious scripts or links into your Joomla database. To clean it:

  1. Access your database using phpMyAdmin.
  2. Search for suspicious code (e.g., iframe, base64_decode, or eval().
  3. Remove malicious entries carefully or restore from a clean SQL dump.

8. Change All Passwords and API Keys

After cleaning:

9. Update Joomla Core and Extensions

Outdated components are a leading cause of hacks. Once cleaned:

  1. Update Joomla to the latest stable version.
  2. Update all installed extensions and templates.
  3. Uninstall any plugins you don’t use anymore.

10. Strengthen Security to Prevent Re-Hacking

Now that your site is restored, apply proactive measures:

Conclusion

Recovering from a Joomla hack requires patience and systematic cleanup. Always start by isolating the site, scanning for infections, and restoring verified files. Once you’re back online, take proactive steps to prevent future attacks — regular backups, updates, and firewalls will save you next time.