How to fix a compromised website plugin
Summary
This guide helps you troubleshoot and resolve: How to fix a compromised website plugin. Follow the steps below to fix the issue.
Common Causes
If your website uses a Content Management System such as WordPress, Joomla, or Drupal, outdated or abandoned plugins can create security vulnerabilities that allow unauthorised access to your site and hosting account. Attackers may inject malicious code, redirect visitors to harmful pages, or use your server to send spam. This article explains how to identify signs of a compromised plugin, safely remove suspicious extensions, and restore your site from a clean backup.
Signs your site may be compromised
Before taking action, look for common indicators that a plugin has been exploited:
- Visitors being redirected to unfamiliar or harmful websites
- New, unknown administrator accounts created in your CMS
- Suspicious files appearing in your website directories
- Hosting alerts about spam being sent from your server
- Unexpected changes to website content or appearance
- Security warnings from search engines or browsers
Quick fix steps
- Put your website into maintenance mode if possible.
- Create a full backup of your site files and database.
- Scan your site for malware and identify compromised files.
- Identify and deactivate the compromised plugin.
- Remove the plugin files from your server.
- Restore your site from a clean, pre-compromise backup.
- Update all remaining plugins, themes, and the CMS core.
- Change all relevant passwords, including CMS admin, hosting, and database credentials.
- Scan your local computer for malware that may have stolen credentials.
Detailed instructions
Step 1: Back up your website
Before making any changes, download a complete copy of your website files and export your database. This ensures you can revert if something goes wrong during the cleanup process.
- Log in to your hosting control panel.
- Open the File Manager or use an FTP client such as FileZilla.
- Download all files from your website's root directory (commonly
public_htmlorwww). - Open phpMyAdmin and export your website database to a
.sqlfile.
Step 2: Identify the compromised plugin
Review your CMS admin dashboard for recently installed or updated plugins. Check modification dates on plugin files via your hosting control panel to spot files changed around the time the issue began.
- Log in to your CMS administrator dashboard.
- Navigate to the Plugins or Extensions section.
- Look for plugins that are outdated, no longer supported by their developer, or that you do not recognise.
- Check your site's error logs for references to specific plugin file paths.
- Use a security scanner or malware detection tool to identify infected files.
Step 3: Deactivate and remove the plugin
- In your CMS dashboard, go to Plugins > Installed Plugins.
- Select Deactivate beneath the suspicious plugin.
- Once deactivated, select Delete to remove the plugin from your site.
- Connect to your server via FTP or File Manager and navigate to the plugins directory (for WordPress, this is typically
/wp-content/plugins/). - Manually delete the plugin folder if any files remain.
akismet to akismet.disabled.Step 4: Restore from a clean backup
Restore your website files and database from a backup created before the compromise occurred. Avoid restoring from a backup taken after the breach, as it may contain the same malicious code.
- Upload your clean website files to the server, overwriting existing files.
- Import your clean database backup via phpMyAdmin.
- Verify that your site loads correctly and that no unfamiliar administrator accounts exist.
- Scan the restored site for any remaining malicious files or code.
Step 5: Update everything
- Update your CMS core to the latest version.
- Update all installed plugins and themes.
- Remove any plugins or themes that are no longer maintained by their developers.
Step 6: Change your passwords
Attackers may have harvested credentials during the compromise. Change the following:
- CMS administrator passwords
- Hosting control panel passwords
- Database user passwords
- FTP and SSH account passwords
Step 7: Scan your local computer
Attackers may have stolen credentials from your computer. Run a full antivirus scan on any device used to access your website or hosting account.
Troubleshooting
Site still crashes after removing the plugin
If unexpected site crashes continue, check your error logs for specific file paths and consider restoring from an earlier backup.
Cannot access the admin dashboard
Use FTP or your hosting control panel's File Manager to rename the wp-content/plugins folder (for WordPress) or the equivalent extensions directory for Joomla or Drupal. This disables all plugins and may allow you to log in.
Still Having Issues?
💻 Open a Ticket