WordPress site hacked? What to do in the first hour

By Asad S. ·

If your WordPress site is hacked, stop changes, take a full backup of the infected state, change all passwords, and scan files and the database for malware before restoring anything. Then find and close the entry point, or the site will be reinfected.

1. Contain the damage

Put the site in maintenance mode if it is redirecting visitors, and change your hosting, WordPress admin, database and FTP/SSH passwords from a clean device. Remove any admin users you do not recognise.

2. Back up the infected site first

It sounds odd, but a copy of the infected state lets an expert see how the attackers got in. Label it clearly and keep it separate from your clean backups.

3. Find the entry point

Most hacks come through an outdated plugin or theme, a nulled (pirated) plugin, a weak or reused password, or an insecure server setting. Check what was updated last and which plugins have known vulnerabilities.

4. Clean, do not just restore

Restoring an old backup can bring the hole back with it. Replace WordPress core files with clean copies, reinstall plugins and themes from trusted sources, and search for backdoor files hidden in uploads and other folders.

5. Harden afterwards

Enable two-factor authentication, limit login attempts, keep everything updated, remove unused plugins, and set up off-site backups you have tested.

6. Ask Google to review

If Google flagged your site, request a review in Search Console after the cleanup so the warning can be removed.

If you would rather have an expert do it, we offer a free scan and a fixed-price cleanup.

Need a hand?

Free scan or fixed-price quote within 24 hours.

Get a free quote

Related services

More guides

Get a free quote