Troubleshooting

Google Says Your WordPress Site May Be Hacked: How to Fix It

What the warning means, what to fix first, and how to ask Google to remove it.

Quick Answer: Open the Security Issues report in Google Search Console to see what Google found. Fix how the attacker got in as well as the damage, clean the whole site, then choose Request a review and describe what you fixed. Google estimates a few days for malware, up to several weeks for hacked spam, and about a day for phishing.

Site Flagged and Need Help?

Tell us what you are seeing and we'll get back to you within one business day.

You search for your own site and there it is: a warning label under the result, or a red screen when you click through. Google thinks your WordPress site has been hacked. Until that flag is cleared, most visitors will back out before they see a thing. This guide covers what the warning means, what to fix first, and how to ask Google to take it off.

What the warning means

Google reports these problems in the Security Issues report in Search Console. It sorts them into three types: hacked content (pages or files added to your site without permission, through a security hole), malware or unwanted software, and social engineering, which means pages built to trick visitors into handing over information or downloading something.

Affected pages can carry a warning in search results, or visitors can hit a full-screen warning in their browser. The report lists sample URLs and the date each problem was first detected.

Check Search Console first

Open the Security Issues report for your site and read what it says before you touch anything. Note the issue type, the sample URLs, and the date. If you have never set up Search Console for the site, do that now. You have to verify ownership to see the report and to ask for a review later.

Fix how they got in, not just what they left behind

Deleting spam pages and calling it done is the most common way to get flagged again. If the way in stays open, the same hole gets used a second time. The usual suspects are an outdated plugin or theme with a known flaw, a weak or reused admin password, and a compromised hosting or FTP account.

In rough order:

  • Save a copy of the hacked site first. You will want it to work out what happened.
  • Find the entry point. Check which plugins and themes were out of date, review hosting access logs around the date Google first detected the problem, and look at who has admin access.
  • Clean the site. If you have a clean backup from before the compromise, restoring it is usually the fastest route. If not, remove the injected files and database content by hand.
  • Close the hole. Update WordPress core, plugins and themes, delete anything you are not using, and remove admin users you do not recognize.
  • Change every credential. That means WordPress, hosting, the database, SFTP and the security keys in wp-config.php.

Our guide on what to do first when a WordPress site is hacked goes through cleanup in more detail, and malicious redirects have their own page.

Check what Google sees, not what you see

Some hacks only show their spam to search engines or to visitors arriving from search results, so a site that looks fine in your own browser does not prove it is clean. Google suggests fetching your pages with a tool like cURL or Wget and checking the homepage and any URL the hacker changed. Make sure Googlebot can crawl the pages, which means no robots rules or noindex tags are blocking them. The URL Inspection tool in Search Console also shows how Google fetched a specific page.

Request the review

When every issue is fixed across the whole site, go back to the Security Issues report and choose Request a review. Describe what the problem was, what you removed or fixed for each category, and how you closed the entry point. Google asks for this detail because it wants to know the problem is gone for real.

Do not submit while problems remain, and do not resubmit while a request is pending. Google says either can make the review take longer.

How long it takes

These are Google's own estimates, so treat them as ranges, not promises.

Issue typeTypical review time
Hacked with spamUp to several weeks
MalwareA few days
PhishingAbout a day

If the site passes, Google says browser and search warnings should clear within about 72 hours. If the review is rejected, the report can show more sample infected URLs. Take that as a sign something was missed and go back through files, users and the database before you try again. Google describes this process in its request a review guide.

Keep it from happening again

A cleanup only holds if something changes afterward. The short list: keep core, plugins and themes updated (tested before they go live), put vulnerability protection in front of known flaws, turn on two-factor authentication for every admin, keep backups off the server, and have someone watching the site. WordPress vulnerability protection blocks exploit attempts against known plugin and theme flaws while updates are tested, and our security services cover the rest.

If you are staring at a flagged site and would rather hand the cleanup to someone else, emergency support exists for exactly this.

Related Guides

Martin Van Den Boogerd
Martin Van Den Boogerd
Founder & Owner, CriticalWP, a WebOps agency for WordPress — background in cybersecurity and municipal government infrastructure
More about Martin →

Common Questions

Google found hacked content, malware, or deceptive pages on your site. Affected pages can show a warning in search results, or visitors can see a full-screen warning in their browser.
In the Security Issues report in Google Search Console. You need to have verified ownership of the site to see it.
Google estimates about a day for phishing, a few days for malware, and up to several weeks for hacked spam. If the site passes, warnings should clear within about 72 hours.
No. Google expects the problem to be fully fixed across the site. Requesting early, or resubmitting while a request is pending, can make the process take longer.
Not necessarily. Some hacks only show their spam to search engines or to visitors coming from search results. Check how Google fetches your pages, not only how they look to you.
A scan can help you find problems, but it does not prove the site is clean and it does not close the way the attacker got in. You still need to fix the cause and verify the result.

Flagged by Google? Get it cleaned and cleared.

We clean the site, close the entry point, and explain plainly what happened.