Tapio Kauranen

Hacked WordPress site

How to recognize a break-in and fix a hacked website.

A hacked WordPress site can usually be recognized by these:

  • A warning from Google
  • Strange pages in search results
  • The site redirects visitors elsewhere

Sometimes the first sign is a message from your hosting provider.

This guide shows:

  • Where to look for the signs
  • How to fix the site step by step
  • How to get Google’s warning removed

At the end I explain how to prevent the next break-in.

If you suspect a break-in right now, start by checking the signs. Don’t delete anything before you have taken a backup.

How do you recognize a hacked WordPress site?

A hacker wants to benefit from your site without you noticing. That is why a break-in rarely shows on the front page. It shows on Google, on a phone or in the files on the server.

The most common signs:

  • A warning from Google in the search result: “This site may be hacked” or “This site may harm your computer”.
  • Strange pages on Google, for example Japanese-language pages or ads for medication that you didn’t create.
  • A redirect elsewhere, often only on a phone and only when arriving from Google.
  • Unknown users or files in WordPress or on the server.
  • A notice from Search Console or your hosting provider.

Many signs are visible only to some visitors. A hacker can show spam pages only to Google (Google) and redirect only mobile visitors elsewhere (Google), so that the site owner doesn’t notice anything.

Try the checker: tick what you have noticed to see the likely cause and how urgent it is.

What have you noticed?

The estimate shows the likely cause and how urgent the matter is.

How does Google show a hacked site?

When Google suspects that a hacker has changed pages on your site or added spam pages to it, it shows the note “This site may be hacked” in the search result. Google’s help page advises against visiting the site for as long as the note is shown.

If the site contains malware, the warning is “This site may harm your computer” (Google). The browser can then also show a warning page before the visitor reaches the site (Google).

The note disappears only after the site has been cleaned and Google has reviewed it:

  1. Verify the site in Search Console.
  2. Open the Security issues report: it lists examples of hacked URLs.
  3. Close the hole through which the site was hacked, and clean the site.
  4. Request a review from the same report.

According to Google, a review for spam content can take up to several weeks and a review for malware a few days. Once the review is approved, the warnings disappear from search results and browsers within 72 hours (Google).

Try the demo: the same search result clean, hacked and with malware.

The same search result in three states

Example: the search result of Kampaamo Kulma, a made-up hair salon.

Clean

  1. Kampaamo Kulma kampaamokulma.fi

    Kampaamo Kulma – hair salon in central Tampere

    Cuts, coloring and shaves on the corner of Keskustori square. Prices from €29, online booking.

Search result No note

An ordinary search result. Google reports the problems it detects in Search Console, so verify your site there now.

Hacked

  1. Kampaamo Kulma kampaamokulma.fi

    Kampaamo Kulma – hair salon in central Tampere

    This site may be hacked

    Cuts, coloring and shaves on the corner of Keskustori square. Prices from €29, online booking.

  2. Kampaamo Kulma kampaamokulma.fi › xqz7 › jp-4417.html

    格安ブランドバッグ通販 – 送料無料

    This site may be hacked

    人気ブランドのバッグを激安価格で。

Search result Hacked

Google shows the note when it has reason to suspect that a hacker has changed pages or added spam pages. Below it is a page the hacker added.

Malware

  1. Kampaamo Kulma kampaamokulma.fi

    Kampaamo Kulma – hair salon in central Tampere

    This site may harm your computer

    Cuts, coloring and shaves on the corner of Keskustori square. Prices from €29, online booking.

Example of a browser warning page

This site may be dangerous

The browser stops the visitor before the site and says that the site may try to install harmful programs.

Search result Malware

Google warns when a site may install harmful software on the visitor’s device. The browser may stop the visitor before the site even loads.

The notes are quoted from Google’s help pages: hacked site, malware. Kampaamo Kulma and its search results are made up.

How to check whether your WordPress site has been hacked

Check five places. The first three work without access to the server.

  1. Search Console. Open the Security issues report. If there are no problems, the report shows a green check mark (help page). While you are there, check in the settings whether there is an owner you don’t know: hackers often add themselves as an owner (Google).
  2. A site: search. Type site:your-domain.com into Google and browse the results. Look for pages you didn’t create and titles in foreign languages.
  3. A scanner. For example, Sucuri SiteCheck checks a site for free. According to Sucuri, however, a remote scanner sees only what a browser sees and detects nothing on the server side.
  4. Users. In WordPress, open Users and select Administrator above the list. You should recognize every administrator.
  5. Files. Look on the server at which files have changed in the last few days. PHP files in the uploads folder, where images belong, are especially suspicious.

The URL Inspection tool in Search Console shows a page the way Google sees it. With it you also find spam that is shown only to Google.

Try the demo to see what a hack looks like in each place.

Where does a hack show?

Search Console

Security issues

Issues detected: 1

Hacked: Content injection

Example URLs:

  • kampaamokulma.fi/xqz7/jp-4417.html
  • kampaamokulma.fi/xqz7/jp-4418.html
  • kampaamokulma.fi/rx/8812.html

A clean site: the report shows a green check mark and a message that no issues were found. Also look at Settings › Users and permissions: hackers often add themselves as an owner.

site: search

  1. Kampaamo Kulmakampaamokulma.fi

    Kampaamo Kulma – hair salon in central Tampere

  2. Kampaamo Kulmakampaamokulma.fi › prices

    Prices – Kampaamo Kulma

  3. Kampaamo Kulmakampaamokulma.fi › xqz7 › jp-4417.html

    格安ブランドバッグ通販 – 送料無料

    You didn’t create this page

  4. Kampaamo Kulmakampaamokulma.fi › rx › 8812.html

    Buy potency pills without a prescription

    You didn’t create this page

A clean site: the results contain only your own pages. Check the titles and descriptions too: a hacker can change existing pages.

Scanner

  • Known malwareNone found
  • BlocklistsNot listed
  • Visible spam contentNone found

ExampleThe backdoor went unnoticed

The scanner found nothing, although there is a hacker’s file on the server. A remote scanner sees only what a browser sees.

Users

WordPress users, example
UsernameEmailRole
kulmainfo@kampaamokulma.fiAdministrator
sannasanna@kampaamokulma.fiEditor
wp-supportsupport@wp-help.exampleAdministratorUnknown to you

A clean site: you recognize every administrator. Delete the accounts you don’t know and change the passwords of the others.

Files

Files in the image folder, example
FileModified
kulma-haircut.jpg2 Sep 2026
kulma-haircut-300x200.jpg2 Sep 2026
cache-4f2a.php3 Oct 2026PHP file in the image folder

A clean site: the image folder contains images and other media files. Also look at which files have changed in the last few days.

If your server has WP-CLI, these commands compare the WordPress and plugin files with the originals on WordPress.org and list the administrators. They change nothing. Of the plugins, only those installed from the WordPress.org directory are checked.

wp core verify-checksums
wp plugin verify-checksums --all
wp user list --role=administrator

Kampaamo Kulma and its data are made up. Sources: Security issues in Search Console, Google: keyword hacks, Sucuri SiteCheck.

How to fix a hacked WordPress site step by step

Do the steps in order. If you start by deleting files, you destroy the traces that show how the hacker got in. If the hole isn’t closed, the same thing happens again.

There are two ways to clean up:

  • Restore a clean backup if you have a backup from before the break-in. This is usually the fastest way.
  • Clean by hand if there is no backup or you don’t know when the break-in happened: reinstall WordPress, the theme and the plugins from clean copies, and delete the files and users the hacker added.

In both cases you change the passwords and keys and update everything. Finally, you ask Google for a review in Search Console.

Try the checklist: tick the steps you have done to see what comes next.

The cleanup as a checklist

0/9 done Next: Back up the current state

  1. Now
    How to do it

    Copy the files and the database before you change anything. The copy shows you later what changed, and it makes the hole easier to find. Don’t restore this copy to the site.

  2. How to do it

    Take the site offline if it redirects visitors to spam pages or distributes malware. Google advises showing visitors a temporary page (503) from another server and telling your hosting provider about the break-in.

  3. How to do it

    Change the passwords of all administrators, as well as those of the hosting control panel, the FTP or SFTP accounts and the database. Use a different password for each. When you change the database password, change it in wp-config.php too.

  4. How to do it

    When you change the keys and salts in wp-config.php, everyone is logged out. You get new keys from the WordPress.org key generator, or WP-CLI changes them with one command:

    wp config shuffle-salts
  5. How to do it

    Delete the WordPress administrators you don’t know, and check the roles of the others too. Remove plugins you haven’t installed yourself. Remove the Search Console owners you haven’t added.

  6. How to do it

    Update WordPress, all plugins and themes. Delete the plugins and themes you don’t use: Google advises removing even deactivated plugins from the server completely.

  7. How to do it

    Restore a backup from before the break-in, or reinstall WordPress, the theme and the plugins from clean copies. Check .htaccess, wp-config.php and the uploads folder: hackers often add redirects and files there (Google).

  8. How to do it

    Do a site: search, check a few URLs with the URL Inspection tool in Search Console and run a scanner. If the spam pages are still in search, see whether their URLs now return a 404 error.

  9. How to do it

    In the request, say what you fixed, for example: “I removed the spam pages and updated the outdated plugin that was used to break in.” (Google) After that, keep an eye on Search Console and the users for a few weeks.

The steps follow Google’s guidance on fixing a hacked site: quarantining the site, cleanup and review request.

How to prevent the next break-in

According to Google, sites are most often hacked through guessed or leaked passwords, outdated software and insecure themes and plugins.

In WordPress, plugins are the biggest risk. According to Patchstack, 11,334 new vulnerabilities were found in the WordPress ecosystem in 2025: 91% in plugins and 9% in themes. Only six were found in WordPress core, and even those were minor.

  • Update WordPress, plugins and themes as soon as an update is released.
  • Use fewer plugins. Every plugin you remove is one possible hole fewer.
  • Strong passwords and two-factor authentication for all administrators. The WordPress hardening guide also recommends two-factor authentication.
  • Backups on a regular basis, stored somewhere other than the website’s server.
  • Good hosting, where the server software is kept up to date.

In maintenance this is continuous work. In WordPress maintenance I update the plugins every week and take care of the backups. In the Coding SEO Consultant service, maintenance is included in the monthly price (€760/month, excl. VAT).

Try the demo: turn on one protection at a time and see which routes it closes.

Close the intruder’s routes

Routes Open routes 6/6

  • Vulnerable plugin or theme Most WordPress vulnerabilities are found in plugins. Open
  • Old WordPress version A version that hasn’t been updated may have a known hole. Open
  • Guessed or leaked password An intruder tries common passwords and ones leaked elsewhere. Open
  • Phished password The password is asked for with a message that looks genuine. Open
  • Outdated server Old server software is a hole just like an old plugin. Open
  • The dashboard file editor An intruder who gets into the dashboard can edit theme and plugin code directly. Open
  • Recovering from a break-in Without a backup, the site has to be cleaned by hand. No backup

Every open route is a way in for an intruder. Turn on the protections one at a time.

You can turn the file editor off with this line in wp-config.php. The WordPress hardening guide says it doesn’t stop malicious files from being uploaded, but it can stop some attacks.

define( 'DISALLOW_FILE_EDIT', true );

The routes follow Google’s list, put in WordPress terms. Sources: Patchstack 2026, WordPress hardening guide.

When should you ask for help?

You can fix the site yourself if you know how to work with the server’s files and database and you have a clean backup. Ask for help if

  • you don’t know how the hacker got in
  • the site gets hacked again after the cleanup
  • the site has an online store or customer data
  • your hosting provider has shut the site down.

If the site holds personal data about customers, the break-in may be a data breach that must be reported to the Finnish Data Protection Ombudsman, where feasible, within 72 hours (the Ombudsman’s guidance).

Restoring and cleaning hacked sites is part of my WordPress maintenance work. Send a message to tapio@tapiokauranen.com or book a free WordPress consultation, and we’ll look at your site together.

The form puts together a message with everything I need to check your site.

When you ask for help, include these

The message is written below as you go.

What did you notice?
Is there a backup?

To: tapio@tapiokauranen.com

Subject: Hacked WordPress site

Hi Tapio,

My WordPress site looks hacked.

Could you take a look at the site?

The form sends and stores nothing. The message is sent only when you send it from your own email.

Frequently asked questions about hacked WordPress sites

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

The most common signs are a warning from Google in the search result, strange pages in a site: search, redirects to other sites, unknown administrators and a notice from your hosting provider.

The most reliable information about what Google has detected is in the Security issues report in Search Console.

How quickly does Google’s warning disappear?

Once the site has been cleaned and you have requested a review in Search Console, a review for spam content can, according to Google, take up to several weeks and a review for malware a few days.

Once the review is approved, the warnings disappear from search results and browsers within 72 hours.

Is restoring a backup enough?

Not on its own. Restoring removes the hacker’s changes, but if the hole isn’t closed, the site can be hacked again the same way.

Change the passwords and keys and update everything right after restoring.

Why do WordPress sites get hacked?

Most WordPress vulnerabilities are in plugins. According to Patchstack, 91% of the WordPress vulnerabilities found in 2025 were in plugins and 9% in themes.

According to Google, guessed or leaked passwords and outdated software are also common ways in.

Can a free scanner confirm that a site is clean?

Not reliably. Sucuri, for example, says that its remote scanner sees only what a browser sees and detects nothing on the server side.

A backdoor can therefore go unnoticed. Check the users and files too.

Do I have to report a break-in to someone?

If the site holds personal data about customers, for example online store orders or form messages, the break-in may be a personal data breach.

According to the guidance of the Finnish Data Protection Ombudsman, it must be reported to the Office of the Data Protection Ombudsman without undue delay and, where feasible, within 72 hours if the breach may cause a risk to people’s rights.

Technical SEO

Indexing, speed and structure back in order after a cleanup.