Guides › WordPress › Security & hacks

Hacked Through a Plugin: Cleanup and Prevention

Most hacks come in through an outdated plugin. Close the hole first, then clean, then change every password.

Reference guide. This guide is written from established practice and the official documentation of the tools involved. We have not yet tested every step on a live demo site. Back up your site before you change anything.

If the entry point is not closed, cleaning only works until the next attack.

Order matters

  1. Take the site offline or into maintenance mode if it is serving spam or malware. See maintenance mode.
  2. Save a copy of the infected site for investigation.
  3. Find the hole. Check which plugins and themes are outdated or named in vulnerability reports. Update or delete them. See vulnerability alert guide.
  4. Clean up. Follow hacked site first steps. Re-install WordPress core and every plugin fresh from clean sources. Delete unknown admin users and check the uploads folder for PHP files. See unknown admins and malicious uploads.
  5. Change every password: WordPress, hosting, FTP, database. Update the keys in wp-config. See wp-config guide.
  6. Ask your host to scan the account and check for other infected sites in the same account.
  7. Request a review if Google flagged the site. See Safe Browsing warning.

Stop it happening again

Keep fewer plugins, update promptly, use strong passwords and two-factor sign-in, and keep offsite backups. See security checklist.

Related guides

Did this solve it? If not, email hello@sitefixlab.org with the exact error text and we will look into it. Try the problem finder.

Last updated 2026-11-21.