Skip to content

My WordPress site has been hacked - what do I do?

By Ash, Founder, HosteazePublished 3 min read

If your WordPress site is hacked, stay calm and work in order. Write down what you're seeing, change every password and reset the security keys in wp-config.php, then restore a clean backup or replace WordPress files with fresh copies. Update everything, scan your own computer, and request a review in Google Search Console if Google has flagged the site.

A pane of window glass with a hole punched through it and cracks spreading outwards, the aftermath of a break-in.
Credit: kirahoffmann via Pixabay

Finding out your website has been hacked feels personal, and the instinct is to start deleting things. Don't, not yet. WordPress's own guidance on hacks starts with a surprisingly calm first step: write down what you're seeing. A clear order of work gets most small business sites back to normal faster than frantic clicking, and it stops you destroying the evidence of how they got in.

What should I do in the first hour?

Should I restore a backup or clean the site?

OptionWhen it makes senseWatch out for
Restore a backupYou have a backup from before the hack startedYou lose anything added since, and the hole is still open
Clean it yourselfNo clean backup, and you're comfortable with SFTPHacks often add new files that are easy to miss
Hire a specialistNo clean backup, or the hack keeps coming backAsk how they'll find the cause, not just the symptoms

If you host with Hosteaze, backups are included, so ask about restoring from a date before the symptoms began. Either way, read the next section, because restoring alone doesn't fix how they got in.

How do I clean a hacked WordPress site?

What do I do about Google warnings?

Open Google Search Console and find the Security issues report. Once every listed issue is fixed on every page, select Request Review and describe what you found and what you fixed. Google says reviews can take from a few days to a few weeks. If you haven't set up Search Console, our guide on setting up Google Search Console shows how.

Hacked sites are often used to send spam, which can get your email blacklisted. If your emails start bouncing, see why your emails are going to spam.

How do I stop it happening again?

Common ways in include outdated plugins, weak or reused passwords, and themes or plugins downloaded from untrusted sites. Keep everything updated using a safe update routine, turn on two-factor login for admin accounts, and keep regular off-site backups. Our wider guide on protecting a website from hackers covers the rest.

Frequently asked questions

How do I know if my WordPress site has been hacked?

Common signs include Google showing a warning about your site, visitors' antivirus blocking it, unfamiliar admin users, pages you didn't create (often spam about pharmacies or gambling), redirects to other sites, or your host telling you the site is sending spam.

Do I have to report a hacked website to the ICO?

Only if personal data was involved and the breach is likely to put people's rights and freedoms at risk, for example customer names, emails or order details. Then UK GDPR requires you to tell the ICO without undue delay and, where feasible, within 72 hours of becoming aware. If the risk to people is high, you must tell them too.

Should I pay someone to clean my site?

If you don't have a clean backup and aren't comfortable comparing files, yes. A specialist will usually be faster and more thorough. Ask what they do to find the original vulnerability, because cleaning without closing the hole means you'll be hacked again.

Sources

  1. WordPress.org Documentation, FAQ My site was hacked
  2. ICO, UK GDPR data breach reporting (DPA 2018)
  3. Google Search Console Help, Security issues report
  4. WordPress Advanced Administration Handbook, Hardening WordPress
A blank white billboard standing in a field under a bright sky, as empty as a website showing the white screen of death.QuestionHow to fix the WordPress white screen of deathThe WordPress white screen of death is a blank page, or a "There has been a critical error" message, caused by a PHP error. A faulty plugin or theme is the usual culprit, often straight after an update. Check your admin email for a recovery mode link, or rename the plugins folder by SFTP to switch every plugin off.WordPress speed · 24 November 2026A country track splitting into two paths between autumn trees, a choice between two routes to the same place.ComparisonWordPress.com vs WordPress.org - what's the difference?WordPress.org is the free, open-source WordPress software that you install on hosting you choose, with full control over plugins, themes and data. WordPress.com is a commercial service run by Automattic that hosts WordPress for you, with features tied to its plans. Choose WordPress.org for ownership and flexibility, WordPress.com if you want everything handled by one company.WordPress speed · 21 November 2026A chalkboard sign reading "open" hanging on a weathered shop door beside a window.QuestionWhat are the hosting requirements for WooCommerce?As of October 2026, WooCommerce recommends WordPress 6.9 or greater, PHP 8.3 or greater, MySQL 8.0 or greater (or MariaDB 10.6 or greater), HTTPS support and a WordPress memory limit of at least 256 MB. Beyond those minimums, a shop needs hosting with enough resources for checkout traffic, plus caching that leaves the cart and checkout alone.WordPress speed · 19 November 2026Lorries and cars queued nose to tail on a motorway, the way requests pile up on an overloaded website.QuestionWhy is my WordPress site slow?Most slow WordPress sites have one of five problems - oversized images, no page caching, a heavy theme or plugin, an old PHP version, or a server that responds slowly. Test the page in PageSpeed Insights, check Tools, Site Health in your dashboard, then switch plugins off one at a time to find the culprit before you change anything else.WordPress speed · 17 November 2026An African elephant walking through tall golden grass under a blue sky. The elephant is PHP's long-standing mascot.QuestionWhat PHP version should I use for WordPress?As of October 2026, use PHP 8.3 or 8.4 for WordPress. WordPress.org recommends 8.3 or greater, and both versions still get security fixes until at least the end of 2027. PHP 8.2 loses security support on 31 December 2026, and 8.1 and older already have. Test on staging before switching, because old plugins may not cope.WordPress speed · 15 November 2026

Hosting made for WordPress

See how our WordPress hosting is set up.

See WordPress hosting