How to Replace Joomla Core Files After a Compromise
Replacing Joomla core files after a compromise is about restoring trust in executable code. Preserve evidence, use the correct official Joomla package, avoid carrying unknown files forward, reinstall extensions from trusted sources, and verify the recovered site before reopening.
Preserve evidence before replacing files
Before destructive cleanup, preserve a forensic copy of suspicious files, relevant logs, and the database when the incident requires investigation. Do not edit the only copy of a suspicious file in place.
Obtain the correct clean Joomla package
Identify the installed Joomla release and obtain the appropriate package from an official Joomla source. Do not mix arbitrary core files from different major or minor releases. If the recovery includes an upgrade, treat that as a planned upgrade with its own compatibility checks.
Separate site-specific data from executable code
Securely preserve configuration.php and verified user content that cannot be recreated, such as legitimate media. Inspect everything you preserve. Do not copy the entire compromised tree into the clean installation, because doing so can carry attacker persistence forward.
Replace the core tree instead of merely overwriting it
Build from a clean Joomla package or replace the compromised core according to a tested recovery procedure. Uploading clean files over the old tree is not enough when malicious extra files may remain because they have no counterpart in the clean package.
Reinstall extensions and templates from trusted packages
Obtain current compatible component, module, plugin, library, and template packages from trusted vendors and reinstall them rather than preserving executable PHP from the compromised installation. Remove abandoned, vulnerable, or unused extensions.
Verify ownership, updates, and the recovered site
Check file ownership and least-privilege permissions after replacement; avoid world-writable modes such as 777. Apply supported security updates, rotate credentials, audit privileged users and database content, scan again, and test frontend/Administrator workflows before reopening. Continue monitoring after service is restored.
Need More Help with Joomla?
Still having trouble? Open a support ticket with QuantaCade Support and we'll be happy to help where we can.
Support priority is given to QuantaCade products, services, and customers. However, we're also happy to assist fellow Joomla users with general Joomla questions and troubleshooting when possible.
QuantaCade is an independent Joomla extension developer and is not official Joomla support. Some issues involving third-party extensions, hosting environments, server configurations, or other systems outside our development control may be beyond what we're able to resolve.