Home › Knowledgebase › KB-1301

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.

Quick Tip: Need immediate assistance? 💻 Open a Ticket

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.

Remember — If you host with us, you don't need to do this yourself — just Open a Ticket and our Brisbane team will get it sorted.

Signs your site may be compromised

Before taking action, look for common indicators that a plugin has been exploited:

Quick fix steps

  1. Put your website into maintenance mode if possible.
  2. Create a full backup of your site files and database.
  3. Scan your site for malware and identify compromised files.
  4. Identify and deactivate the compromised plugin.
  5. Remove the plugin files from your server.
  6. Restore your site from a clean, pre-compromise backup.
  7. Update all remaining plugins, themes, and the CMS core.
  8. Change all relevant passwords, including CMS admin, hosting, and database credentials.
  9. 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.

  1. Log in to your hosting control panel.
  2. Open the File Manager or use an FTP client such as FileZilla.
  3. Download all files from your website's root directory (commonly public_html or www).
  4. Open phpMyAdmin and export your website database to a .sql file.
Store your backup in a secure location separate from your web server. Do not rely solely on automated hosting backups, as these may also contain compromised files.

Step 2: Identify the compromise date

Identifying when the compromise occurred is critical to selecting a clean backup. Restoring from a backup taken after the breach will simply reinstate the malicious code.

  1. Review your hosting access logs and CMS error logs for unusual activity spikes or unexpected POST requests.
  2. Check the modification dates of plugin files via your hosting control panel's File Manager.
  3. Review the list of administrator users in your CMS to see when unknown accounts were created.
  4. Note the date and time when visitors first reported redirects or security warnings.

Step 3: Identify the compromised plugin

Review your CMS admin dashboard for recently installed or updated extensions. Look for plugins that are outdated, no longer supported by their developer, or that you do not recognise.

WordPress

  1. Log in to your WordPress admin dashboard.
  2. Navigate to Plugins > Installed Plugins.
  3. Look for plugins with a red update notification or those not updated in over a year.

Joomla

  1. Log in to your Joomla administrator panel.
  2. Navigate to Extensions > Manage > Manage.
  3. Check the version numbers and look for extensions marked as outdated.

Drupal

  1. Log in to your Drupal admin dashboard.
  2. Navigate to Extend.
  3. Review the list of installed modules for any that are no longer maintained.

Step 4: Deactivate and remove the plugin

Deactivate the suspicious plugin immediately to stop the exploit from running. After deactivation, remove the plugin files entirely from your server.

WordPress

  1. Go to Plugins > Installed Plugins.
  2. Click Deactivate beneath the suspicious plugin.
  3. Once deactivated, click Delete to remove the plugin from your site.
  4. Connect via FTP or File Manager and navigate to /wp-content/plugins/.
  5. Manually delete the plugin folder if any files remain.

Joomla

  1. Go to Extensions > Manage > Manage.
  2. Select the checkbox next to the suspicious extension.
  3. Click the Uninstall button in the toolbar.
  4. Connect via FTP or File Manager and navigate to /plugins/ or /modules/ depending on the extension type.
  5. Manually delete the extension folder if any files remain.

Drupal

  1. Go to Extend.
  2. Uncheck the box next to the module you wish to disable.
  3. Click the Uninstall button at the bottom of the page.
  4. Connect via FTP or File Manager and navigate to /modules/contrib/ or /modules/custom/.
  5. Manually delete the module folder if any files remain.
If you cannot access your admin dashboard, rename the plugin or module folder via FTP to disable it. For example, rename akismet to akismet.disabled.

Step 5: Verify backup integrity and restore

Select a backup created before the date of compromise identified in Step 2. Verify that the backup files are not corrupted before uploading them to your server.

WordPress

  1. Upload your clean website files via FTP or File Manager, overwriting existing files in public_html.
  2. Open phpMyAdmin, select your website database, and use the Import tab to upload your clean .sql file.
  3. Log in to the WordPress dashboard and go to Users > All Users to ensure no unfamiliar administrator accounts exist.

Joomla

  1. Upload your clean website files via FTP or File Manager, overwriting existing files in public_html.
  2. Open phpMyAdmin, select your Joomla database, and use the Import tab to upload your clean .sql file.
  3. Log in to the Joomla administrator panel and go to Users > Manage to check for unknown accounts.

Drupal

  1. Upload your clean website files via FTP or File Manager, overwriting existing files in public_html.
  2. Open phpMyAdmin, select your Drupal database, and use the Import tab to upload your clean .sql file.
  3. Log in to the Drupal dashboard and go to People to check for unknown administrator accounts.
Warning: Do not reactivate the compromised plugin unless the vulnerability has been patched in a newer version. If no patched version exists, replace the plugin with a maintained alternative to prevent reinfection.

Step 6: Update everything

Ensure your entire stack is up to date to close known security holes.

WordPress

  1. Go to Dashboard > Updates and update the WordPress core.
  2. Go to Plugins > Installed Plugins and update all active plugins.
  3. Go to Appearance > Themes and update your active theme.

Joomla

  1. Go to Components > Joomla Update to update the core.
  2. Go to Extensions > Manage > Update to update extensions.

Drupal

  1. Go to Reports > Available updates to check for core and module updates.
  2. Use the Extend page to update contributed modules.

Step 7: Change your passwords

Attackers may have harvested credentials during the compromise. Change the following credentials immediately after restoration:

Step 8: 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 that predates the compromise.

Cannot access the admin dashboard

Use FTP or your hosting control panel's File Manager to rename the extensions directory. For WordPress, rename /wp-content/plugins/. For Joomla, rename the relevant folder within /plugins/. For Drupal, rename the relevant folder within /modules/. Disabling all extensions may allow you to log in.

If you host with us, you don't need to do this yourself — just Open a Ticket and our Brisbane team will get it sorted.

Still Having Issues?

Need more help? If the issue persists after trying these steps, please open a support ticket and our team will assist you.

💻 Open a Ticket