Skip to content
Security

How to tell if your WordPress site is hacked

The visible and hidden signs of a hacked WordPress site, safe checks you can run yourself, and what to do next if you find something.

By WP24×7 engineers6 min readPublished November 29, 2026Updated November 29, 2026

At a glance

A guide to spotting a hacked WordPress site. It lists the obvious signs, such as defacement and browser warnings, and the quiet ones, such as spam pages in Google, conditional redirects and unknown administrators. It gives safe read-only checks, including WP-CLI commands, explains what is normal noise, and says what to do first if you find something.

Updated November 29, 2026 · For WordPress site owners

  • For WordPress site owners who suspect a compromise
  • Checks private window on a phone, site: search, Users, files, scanner
  • Do first stop changing things and take a backup copy as evidence
  • Do not delete files or reinstall WordPress yet
  • Cleanup find the way in and the backdoors, not only the symptom
  • Help emergency support is open 24x7, reply inside 15 minutes

Some hacks are obvious, and many are not. Look for visible defacement, redirects, strange search results, unknown admin users and unexpected files, and treat any of them as a reason to investigate, not to panic.

What are the obvious and quiet signs?

TypeSignWhat to look at
ObviousPages show someone else's messageThe pages themselves
ObviousBrowser or Google warns the site is dangerousThe warning and Search Console
ObviousHost suspends the site or emails about malware or abuseYour host's message
ObviousYou cannot log in and the reset email goes elsewhereThe admin email address
ObviousSudden slowness or downtimeA script using server resources
QuietStrange pages in Googlesite:yourdomain.com
QuietRedirects for some visitors onlySearch, mobile or logged-out visitors
QuietNew admin usersUsers, filtered by Administrator
QuietUnfamiliar plugins or themes, or a deleted plugin backPlugins and Themes lists
QuietOutgoing spamEmail service and host reports
QuietChanged site address, admin email or permalinksSettings
QuietPHP files in uploads or odd files in the rootFile manager or SFTP

Many attackers want to stay hidden so they can keep using the site. Also watch Google Search Console warnings and unexplained traffic changes, such as a drop or a rise from unrelated countries.

Scanning a site for hidden malware

How do I check safely?

You can check without changing anything. Do not delete files yet.

  1. Look from the outside

    Open the site in a private window, on your phone using mobile data, and by clicking a link from a Google search result. Compare what you see.

  2. Search Google

    for site:yourdomain.com and a few spam words, and review results beyond the first page.

  3. Review Users

    for administrators and recent registrations.

  4. Review plugins and themes

    against what you know you installed.

  5. Check Search Console's

    Security issues and Manual actions reports.

  6. Run a scan

    A reputable security plugin or your host's scanner can compare core files to the originals and flag known malware. Treat a clean result as one data point.

  7. Look at logs and files

    Check your host's logs and file manager for recently modified PHP files, especially in uploads.

  8. Check `.htaccess` and `wp-config.php`

    for code you did not add, especially long, scrambled-looking strings.

  9. Check scheduled tasks

    Odd entries in WP-Cron can restart an infection after you remove it. A plugin or WP-CLI (wp cron event list) shows them.

  10. Test your email

    Look at the sent folder or mail logs for messages you did not send.

Be careful with what you click when the site may be serving malware. Check from a device without saved admin sessions, and keep your own computer's security software current.

Checks you can run from the command line

If you have SSH and WP-CLI, these read-only commands give a quick picture:

wp core verify-checksums
wp plugin verify-checksums --all
wp user list --role=administrator --fields=ID,user_login,user_email,user_registered
find wp-content/uploads -name '*.php'

The first two compare files with official copies. The third lists administrators with registration dates, so a recently created account stands out. The last looks for PHP files in uploads, where there should normally be none, though a few plugins legitimately place an index file there. None of these changes anything. A result that surprises you is a reason to ask for help, not to start deleting.

Which sign points to what?

What you seeWhat it often meansNext step
Spam pages in Google, none on your siteCloaked content shown only to search enginesCheck Search Console, then investigate files
Redirect only from Google or mobileA conditional rule in .htaccess or injected scriptSee redirect hack fix
Unknown administratorAccount created by an intruderPreserve evidence, then remove after backup
PHP file inside uploadsDropped backdoor or web shellDo not delete yet, take a copy and get help
Host email about abuseSite being used to send spam or attack othersAct the same day
Everything fine, but a scanner warnsPossible false positive, or hidden infectionVerify with more than one check

What does it not mean?

A single failed login attempt in a log, or a security plugin blocking requests, is normal. Bots probe every site all day. What matters is evidence that someone succeeded: new users, changed files, injected content, or traffic that goes elsewhere.

Likewise, a site that is slow is not necessarily hacked. Our speed optimization page covers other causes.

Worked example: a site that looks fine

Imagine an owner who sees nothing wrong, but whose customers say the site redirects to a gambling page from their phones. The owner checks on a laptop with an admin session open and sees no issue. A test in a private window on a phone using mobile data reproduces the redirect straight away. Users shows one unknown administrator created three weeks earlier, and the scan flags a file in a theme folder. That sequence, a private window plus a phone, a user list and a file scan, is often enough to turn "it looks fine" into a confirmed problem.

What should I do if I find something?

  1. Stop making changes

    Do not delete files or reinstall WordPress yet, since you may destroy evidence of how they got in.

  2. Take a full backup copy

    of files and database, labelled as infected, and store it off the server.

  3. Follow the first-hour plan

    in what to do in the first hour after a WordPress hack.

  4. Get the site cleaned properly

    Removing a visible symptom without finding the way in and the backdoors usually leads to a reinfection within days.

What if I find nothing?

Absence of evidence is not proof. If you still have a reason to worry, such as a host warning or odd traffic, have someone check server logs and file modification times, which show changes you cannot see from the dashboard. Then fix the cause of your suspicion: unpatched plugins, reused passwords, old accounts. A site that is clean today and unpatched is clean for a limited time.

How do I reduce the chance next time?

Most WordPress compromises come through outdated plugins and themes, weak or reused passwords, and stolen credentials, not clever attacks on core. The remedy is dull and effective: prompt updates, two-factor authentication, fewer plugins, least-privilege users, a firewall and tested backups. Our maintenance checklist lists the routine.

Who should I tell?

If you store customer data, you may have a duty to notify customers, a payment provider or an authority after a breach. Rules vary by country and by what data was involved. We can tell you what the evidence shows, but you should take legal advice about notification duties.

Think your site is hacked?

Call the help desk now, or post a project and a person reads it.

FAQ

Questions people ask

12 answers. Can't find yours? Ask an engineer.

Can a hacked site look completely normal?

Yes. Many compromises show different content only to search engines, mobile visitors or logged-out users, so the owner sees nothing wrong.

Link to this answer
Is a security plugin scan enough to prove my site is clean?

No. A clean scan is encouraging, but scanners miss things. Combine it with checks of users, files, search results and server logs.

Link to this answer
What should I do if I think I am hacked?

Do not delete things yet. Take a backup copy as evidence, then follow the first-hour steps in our guide and get the site cleaned properly.

Link to this answer
What is the quickest test for a hidden redirect?

Open the site in a private window on a phone using mobile data, and click through from a Google search result. Many redirects fire only for those visitors.

Link to this answer
How do I check Google for injected spam pages?

Search for site: followed by your domain and add spam words such as pharmacy or casino. Review results beyond the first page. Pages in another language or products you never made are a strong sign.

Link to this answer
Is a failed login attempt in my logs a sign of a hack?

No. Bots probe every site all day, and a security plugin blocking requests is normal. What matters is evidence that someone succeeded, such as new users, changed files or injected content.

Link to this answer
Does a slow site mean I was hacked?

Not necessarily. Slowness has many ordinary causes. It can also be a malicious script using server resources, so check it together with the other signs rather than alone.

Link to this answer
Why is a PHP file inside the uploads folder suspicious?

Uploads normally hold media, not code. A PHP file there can be a backdoor or web shell, although a few plugins legitimately place an index file. Take a copy and get it examined before deleting.

Link to this answer
What read-only commands can I run with WP-CLI?

wp core verify-checksums and wp plugin verify-checksums compare files with official copies, wp user list shows administrators with registration dates, and a find for php files in uploads lists suspect files. None changes anything.

Link to this answer
Why does the infection come back after I delete the bad file?

Removing a visible symptom without finding the way in and the backdoors usually leads to reinfection within days. A proper cleanup removes the entry point, hidden accounts and scheduled tasks too.

Link to this answer
How do most WordPress sites get hacked?

Mostly through outdated plugins and themes, weak or reused passwords and stolen credentials, not clever attacks on core. Prompt updates, two-factor authentication, fewer plugins and tested backups reduce the risk.

Link to this answer
Do I have to tell customers if my site was breached?

If you store customer data you may have a duty to notify customers, a payment provider or an authority. Rules vary by country and data type, so take legal advice on notification.

Link to this answer

Keep reading

Want an engineer on it?

Tell us what is wrong in plain words. A person reads it, today.