Hacked WordPress site: what to do, in order
10 min Intermediate
A hacked site can be cured, often without losing anything. The key is not to act in the wrong order: deleting files at random often does more damage than the hacker.
-
1
Confirm and keep a copy
Write down what you see (redirect, unknown page, Google message, email from your host) and make a full backup as it is (files and database). It helps to understand what happened and to recover content deleted by mistake.
-
2
Change the passwords
Change right away the passwords of the WordPress administrator accounts, the hosting, FTP/SSH and the database (remember to update
wp-config.php). Delete administrator accounts you do not know. -
3
Find the modified files
Compare the WordPress core and your plugins with the official versions: any different file is suspicious. Also look for PHP files in
wp-content/uploads, which should never contain any. The platform antivirus runs both checks every hour and puts the official files back. -
4
Clean up without deleting blindly
Reinstall the core and plugins from official sources, quarantine (outside the site) rather than delete, and review by hand what belongs to you (child theme,
wp-config.php,.htaccess). Check the database: scheduled tasks,siteurlandhomeoptions, scripts added to posts. -
5
Close the hole
Most often: an outdated plugin, a "nulled" (pirated) plugin, a weak or reused password. Update everything, remove what you do not use, turn on two-factor authentication. The platform vulnerability watch tells you when an installed plugin has a known flaw.
-
6
Tell Google and keep watching
If Google shows "This site may be hacked", request a review in Search Console once the site is clean. Keep an eye on it for a few weeks: a hacker sometimes leaves a second door. When in doubt, or if the site is badly hit, the Human alert button sends all the context to a developer.
Ready to try?
Free, no credit card. Nothing changes without your approval.