November 21, 2026
WordPress admin dashboard showing security warning indicators and user accounts
Learn the warning signs your WordPress site has been hacked and the exact first steps to contain damage before cleanup or restoration.

When your WordPress site starts behaving strangely, visitors see warnings, or you notice unfamiliar content in search results, you are probably looking at a compromised installation. A hack can destroy traffic, tank your search rankings, and push malware to anyone who lands on your pages. This guide walks you through the warning signs that separate normal WordPress quirks from an actual breach, then shows you the exact sequence of actions to contain damage before you attempt any cleanup or recovery.

The setup

You will need access to WordPress Admin Dashboard > Users, Tools > Site Health, and your hosting control panel. This article focuses on recognizing compromise indicators before you start any cleanup work. It does not walk through malware removal or restoration steps; those come after you confirm the breach and lock down access.

Warning signs in the dashboard and front-end

Open your WordPress admin and check Users > All Users. Look for any administrator or editor account you did not create. Attackers inject new user accounts to maintain persistence even after you change passwords. If you see usernames like "admin2" or random strings you never added, that is a red flag. Check the registration date column; a new admin account created last night when you were asleep is a clear breach indicator.

Next, visit your live site in an incognito browser window. If you see pop-ups, banner ads, or spammy links that do not appear when you are logged in, malicious code is filtering output for anonymous visitors. Hackers hide these changes from site owners to buy time before discovery. Check your homepage source code by right-clicking and selecting "View Page Source." Search for unfamiliar <script> tags or inline JavaScript that references external domains you do not recognize.

wordpress security

Browser warnings are impossible to miss. If Chrome or Firefox displays "Deceptive site ahead" or "This site may harm your computer" before your homepage loads, Google Safe Browsing has flagged your domain. These warnings mean search engines detected malware, phishing forms, or redirect chains. Your traffic will collapse overnight once these warnings appear, and visitors who bypass the warning risk infection.

Check Tools > Site Health in your dashboard. WordPress 5.2 and later includes a diagnostics panel that flags outdated software, inactive plugins and themes, missing HTTPS, and other configuration problems. It does not verify core file checksums, so to detect modified core files run the WP-CLI command wp core verify-checksums or use a security plugin's file integrity scan. Treat Site Health as a general health check rather than a breach detector.

Search results and hosting provider alerts

Open Google Search Console if you have it connected. Navigate to the Security Issues section. Google reports malware detections, hacked content warnings, and social engineering flags here before they escalate to full browser warnings. If you see any active issues, your site is compromised or was recently cleaned but not yet reviewed.

Perform a site-specific search in Google using this operator:

site:yourdomain.com

Scan the first few pages of results for unfamiliar titles, foreign-language spam, or pharmaceutical product pages you never published. Hackers inject these pages to generate ad revenue or rank for illicit keywords. If you spot pages like "cheap-pills" or Cyrillic text in your index, attackers have created hidden content on your server.

Your hosting provider may send an abuse notification or suspend your account without warning. Check your inbox and spam folder for messages flagging malicious files, excessive outbound email, or resource abuse. Hosts scan for known malware signatures and quarantine sites automatically. If your account is suspended, you are already deep into a breach and need to respond within hours to avoid permanent data loss.

Watch your email domain reputation. If your business inbox suddenly fills with bounce messages for emails you never sent, attackers are using your domain to relay spam. Run a check at MX Toolbox or similar services to see if your domain landed on a blacklist. Spam relays usually happen when attackers compromise your hosting account or install a mailer script in a hidden directory.

Traffic patterns and server behavior

Open your analytics dashboard and filter for the past seven days. A sudden traffic spike from unusual countries, especially paired with high bounce rates, suggests bot traffic or redirect schemes. Attackers drive traffic through your site to inflate ad impressions or distribute malware. Conversely, a sharp drop in organic traffic often follows Google deindexing your pages due to detected malware.

Check server logs in your hosting control panel under Logs or Access Logs. Look for repeated requests to wp-login.php or xmlrpc.php from single IP addresses. While brute-force attempts are common background noise, successful logins from unfamiliar locations indicate compromise. If you see POST requests to files in wp-content/uploads or wp-includes, attackers may have uploaded a backdoor.

Your site may slow to a crawl or crash intermittently. Malicious scripts consume CPU and memory to mine cryptocurrency, send spam, or participate in distributed attacks. If your hosting provider contacts you about resource limits or your site times out during normal traffic, check running processes and active connections in your server control panel. Legitimate WordPress operations do not pin CPU at 100% for extended periods.

What to do the moment you confirm a breach

Change every password associated with your site immediately. Start with your hosting control panel login, FTP or SFTP credentials, and database user password. Then update your WordPress admin password, even if you do not see evidence of unauthorized logins. Attackers who gain shell access can read password hashes from the database or install keyloggers. Use unique, randomly generated passwords of at least 16 characters for each service.

Log into your hosting control panel and place your site in maintenance mode or replace your homepage with a static HTML page that tells visitors you are addressing a security issue. This prevents malware distribution to real users and stops search engines from indexing new malicious content. If your host provides a "suspend site" toggle that keeps the domain live but blocks public access, use it. Do not simply leave the hacked site running while you investigate.

Contact your hosting provider through their support ticket system or live chat. Tell them you confirmed a breach and ask if they detected malicious files or saw unusual activity in server logs. Many hosts keep file snapshots or access logs that pinpoint the entry vector. Request copies of recent logs and ask if they offer malware scanning or cleanup services. Some providers will restore your site from an automated backup at no charge if the breach is recent.

Before you delete anything, copy the entire compromised site to your local machine or a separate directory on the server. Use an FTP client to download wp-content, wp-config.php, and your database export. This snapshot preserves evidence for forensic analysis. You need to understand how attackers gained access so you can close the vulnerability before restoring. If you skip this step and restore a clean backup, attackers may re-enter through the same hole.

What breaks

You change all passwords but malicious content reappears

Attackers installed a backdoor file that lets them regain access without credentials. These PHP shells hide in plugin directories, theme folders, or wp-content/uploads with names like "cache.php" or "version.php." Scan your entire WordPress directory for files modified after the breach date. Delete any PHP file in uploads that you did not place there yourself. Reinstall all plugins and themes from the official WordPress repository to overwrite tampered files. If the backdoor persists, your hosting account itself may be compromised; contact your provider to reset SSH keys and audit server-level access.

Google still shows warnings after you clean the site

Search engines cache security flags and do not automatically remove warnings once you fix the underlying issue. Log into Google Search Console and navigate to Security & Manual Actions > Security Issues. After you verify all malware is removed, click "Request Review" and explain the steps you took. Google typically responds within 72 hours. If the review fails, they will tell you which URLs still contain malicious code. Clear your browser cache and test those URLs in an incognito window to confirm they are clean, then submit another review request.

Your host restored a backup but the site was hacked again within hours

The backup you restored was already compromised, or the vulnerability that allowed the initial breach is still open. Check the modification dates on core WordPress files and compare them against the official release dates. If wp-login.php or wp-includes/user.php shows a modified date after the last WordPress release, the backup contained injected code. Restore from an older backup taken before the earliest suspicious activity you can find. Then update WordPress core, all plugins, and your theme to their latest versions to patch known exploits. Disable file editing in the dashboard by adding this line to wp-config.php:

define('DISALLOW_FILE_EDIT', true);

This prevents attackers from modifying theme files through the admin interface if they compromise an account.

FAQs

Can a hack hide completely from site owners while still affecting visitors?

Yes. Attackers use cloaking techniques that detect logged-in administrator sessions and serve clean pages to those IPs while showing malware, redirects, or spam to everyone else. This delay in discovery gives them more time to monetize the breach. Always test your site in an incognito window from a different device or network when you suspect compromise.

Should you delete the site and start fresh or try to clean it?

Cleaning is faster if you have recent clean backups and can identify the entry point. Starting fresh guarantees no residual malware but requires rebuilding customizations, restoring content from exports, and reconfiguring plugins. Choose cleanup if the hack is less than a week old and you have database exports from before the breach. Rebuild from scratch if the compromise went undetected for months or if core database tables were altered.

Do security plugins catch hacks before they cause visible damage?

Security plugins like Wordfence or Sucuri scan for known malware signatures and monitor file changes, but they miss zero-day exploits and custom backdoors until their databases update. They are most effective at preventing brute-force attacks and flagging suspicious logins. If you install a security plugin after a breach, run a full scan immediately but do not assume a clean scan means your site is safe. Manual file inspection and log review remain necessary.

How do you tell if outbound spam is coming from your site or just spoofing your domain?

Check your hosting account email logs for sent message counts. If thousands of emails left your server in the past 24 hours but you did not send them, your hosting account or a contact form plugin is compromised. If the logs show no unusual activity, attackers are spoofing your domain in email headers without actually using your server. Configure SPF, DKIM, and DMARC records in your DNS settings to prevent spoofing, but these will not stop a breach where attackers control your server.

Can you trust a backup if you do not know exactly when the hack started?

Not without verification. Export the backup to a local test environment and run a malware scanner like ClamAV or a WordPress-specific tool across all files. Check the database for unfamiliar admin users, posts with hidden content, or options table entries pointing to external scripts. If the backup is clean, note its date and use it as the restoration point. If it is already compromised, work backward through older snapshots until you find one that predates all suspicious activity.

Verdict: Change every password and take the site offline immediately when you spot browser warnings, unfamiliar admin accounts, or spam in your search results. Preserve a copy of the compromised site before you restore or clean, because understanding the entry point is the only way to prevent reinfection.