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.
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
On this page
- What are the obvious and quiet signs?
- How do I check safely?
- Checks you can run from the command line
- Which sign points to what?
- What does it not mean?
- Worked example: a site that looks fine
- What should I do if I find something?
- What if I find nothing?
- How do I reduce the chance next time?
- Who should I tell?
- FAQ
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?
| Type | Sign | What to look at |
|---|---|---|
| Obvious | Pages show someone else's message | The pages themselves |
| Obvious | Browser or Google warns the site is dangerous | The warning and Search Console |
| Obvious | Host suspends the site or emails about malware or abuse | Your host's message |
| Obvious | You cannot log in and the reset email goes elsewhere | The admin email address |
| Obvious | Sudden slowness or downtime | A script using server resources |
| Quiet | Strange pages in Google | site:yourdomain.com |
| Quiet | Redirects for some visitors only | Search, mobile or logged-out visitors |
| Quiet | New admin users | Users, filtered by Administrator |
| Quiet | Unfamiliar plugins or themes, or a deleted plugin back | Plugins and Themes lists |
| Quiet | Outgoing spam | Email service and host reports |
| Quiet | Changed site address, admin email or permalinks | Settings |
| Quiet | PHP files in uploads or odd files in the root | File 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.
How do I check safely?
You can check without changing anything. Do not delete files yet.
- 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.
- Search Google
for
site:yourdomain.comand a few spam words, and review results beyond the first page. - Review Users
for administrators and recent registrations.
- Review plugins and themes
against what you know you installed.
- Check Search Console's
Security issues and Manual actions reports.
- 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.
- Look at logs and files
Check your host's logs and file manager for recently modified PHP files, especially in uploads.
- Check `.htaccess` and `wp-config.php`
for code you did not add, especially long, scrambled-looking strings.
- 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. - 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 see | What it often means | Next step |
|---|---|---|
| Spam pages in Google, none on your site | Cloaked content shown only to search engines | Check Search Console, then investigate files |
| Redirect only from Google or mobile | A conditional rule in .htaccess or injected script | See redirect hack fix |
| Unknown administrator | Account created by an intruder | Preserve evidence, then remove after backup |
| PHP file inside uploads | Dropped backdoor or web shell | Do not delete yet, take a copy and get help |
| Host email about abuse | Site being used to send spam or attack others | Act the same day |
| Everything fine, but a scanner warns | Possible false positive, or hidden infection | Verify 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?
- Stop making changes
Do not delete files or reinstall WordPress yet, since you may destroy evidence of how they got in.
- Take a full backup copy
of files and database, labelled as infected, and store it off the server.
- Follow the first-hour plan
- 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.
Call the help desk now, or post a project and a person reads it.
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 answerIs 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 answerWhat 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 answerHow 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 answerIs 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 answerDoes 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 answerWhy 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 answerWhat 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 answerWhy 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 answerHow 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 answerDo 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 answerKeep reading
Want an engineer on it?
Tell us what is wrong in plain words. A person reads it, today.