What Happens When a Website Gets Hacked?
When a website gets hacked, the attacker usually plants a hidden way back in first, then uses your site for spam, redirects, malware or stolen data, and the visible damage (browser warnings, blocklists, lost Google rankings) often shows up days or weeks later.
This post is for owners of small sites, WordPress and Shopify stores, indie SaaS and local businesses who want to know what really happens after a break-in. You will get a stage-by-stage timeline, the warning signs at each stage, a few checks you can run today, and the recovery steps to follow. Timelines vary. Not every hack goes through every stage, and some are caught early.
Can a website be hacked? Yes, usually in boring ways
Yes, websites get hacked every day, and most of it is not personal. Attackers use automated tools that scan the internet for known weaknesses, then break into whatever answers. Your site does not need to be famous or big.
The usual ways in are plain:
- Outdated plugins, themes or apps with a publicly known flaw. Known flaws are catalogued in the National Vulnerability Database.
- Stolen or reused passwords, often from an unrelated breach.
- Weak or exposed admin logins with no second step (two-factor authentication).
- Broken access control, where a page lets someone do things they should not. It is a top category in the OWASP Top 10.
Want to know how exposed you might be? Our guide on whether your website is hackable walks through it.
The timeline at a glance
| Stage | When | What the attacker does | Warning signs you might see |
|---|---|---|---|
| 1. Break-in | At the start | Gets in, adds a backdoor (a hidden way back in) or a new admin user | Unknown admin accounts, changed files, login alerts |
| 2. Your site is put to work | Soon after | Adds spam pages, redirects visitors, injects malware or a card skimmer | Odd pages in Google, redirects on phones, slower site |
| 3. Warnings and blocklists | Often days to weeks later | Your site is flagged as unsafe or used to send spam | Red browser warning, email bouncing, host suspension |
| 4. Data theft and lost rankings | Ongoing | Copies data or keeps injecting spam | Traffic and rankings drop, customers report fraud |
Think of this as a common pattern, not a schedule. Some attackers move fast. Others sit quietly for a long time.
Stage 1: The break-in and the backdoor
Once inside, a careful attacker does not rush. They first make sure they can come back, even if you change your password or update the flawed plugin.
Typical moves:
- Create a new administrator account with a believable name.
- Upload a small script (a web shell) that lets them run commands from a browser.
- Hide extra code inside theme files, the uploads folder or the database.
- Add a scheduled task that quietly re-infects the site.
Warning signs: admin users you do not recognize, files changed on dates you did not touch them, or a login notification at a strange hour. This is the best stage to catch a hack, because little damage is done yet.
Stage 2: Your site starts working for them
Now the attacker turns your site into a tool. Common uses:
- Spam pages (SEO spam). Hundreds or thousands of pages selling pills, gambling or fake goods, often hidden from you but shown to Google.
- Sneaky redirects. Visitors, often only on mobile or from Google, get sent to scam sites.
- Malware downloads. Fake update prompts or infected files.
- Card skimmers. Code on a checkout page that copies payment details as customers type them.
- Spam email. Your server or your domain is used to send junk.
You, as the owner, may see nothing. Hacks are often built to hide from the logged-in admin.
Warning signs: search Google for your site and see strange titles, a slower site, customers saying they got redirected, or hosting emails about unusual traffic.
Stage 3: Warning screens and blocklists
Sooner or later, someone notices. Google Safe Browsing and similar systems flag sites that host malware or phishing. Visitors then see a full-page red warning in Chrome and other browsers. Search results can also carry labels such as "This site may be hacked", as Google Search Central explains.
Other consequences at this stage:
- Your email lands in spam, or bounces, if your domain or server was used to send junk.
- Your hosting company may suspend the account.
- Customers lose trust fast, and some do not come back.
You can check your status for free in Google's Safe Browsing site status tool.
If email is part of your worry, our email spoofing tool checks whether your domain is easy to impersonate.
Stage 4: Stolen data and lost search rankings
This is the slow, expensive part. Depending on what the site holds, an attacker may copy customer lists, order details, form submissions or login hashes (scrambled passwords). Those can be sold or used against your customers on other sites. Depending on where you and your customers live, you may have legal duties to report a breach.
Meanwhile, search rankings suffer. Spam pages dilute your content, and Google may demote or label hacked pages. Rankings often come back after a proper cleanup and a review request, but it can take time. I will not give you a number, because it depends on the site and how long the hack ran.
The real costs, in plain terms:
- Lost sales while the site is flagged or down.
- Cleanup time or paid help.
- Lost search traffic.
- Customer trust, and possibly breach notifications.
Quick checks you can run today
These will not prove you are clean, but they catch common signs.
These WP-CLI checks need SSH access and WP-CLI, and should be run as the site's user, not root. On Shopify or a custom app, check your staff or admin user list and installed apps instead.
1. Look for spam pages in Google. Search this, swapping in your domain:
site:yourdomain.com casino OR viagra OR "cheap" OR replica
2. Check admin users (WordPress, with WP-CLI):
wp user list --role=administrator
3. Verify WordPress core and plugin files against the official copies (WordPress, with WP-CLI):
wp core verify-checksums
wp plugin verify-checksums --all
Files reported as modified or unexpected deserve a closer look. Some premium plugins are not in the official repository, so they may not be checked.
4. Find recently changed PHP files (run in your site folder over SSH):
find . -type f -name "*.php" -mtime -7
Attackers can fake file dates and normal updates change files too, so treat this as a clue, not proof. An empty result does not mean the site is clean, and a long list does not prove a hack.
5. Look at your scheduled tasks (WordPress, with WP-CLI):
wp cron event list
You can also run our free website security check for a passive look from the outside.
What to do if you see a warning sign
Do not panic and do not delete things at random. Follow this order:
- Take a backup of the current state (even the infected one) and store it somewhere private, away from your live site. Keep it as evidence only. Do not restore from it.
- Find and remove backdoors first. Remove unknown admin users and web shells (hidden scripts that let an attacker run commands) before you change any passwords. Otherwise the attacker can keep their access or capture your new passwords. If you only delete the visible spam, the attacker returns.
- Update everything (core, plugins, themes) and remove what you do not use.
- Rotate the WordPress secret keys and salts in
wp-config.phpand log out all sessions. Replace the eight key and salt lines with fresh values from the official WordPress.org generator. This signs everyone out, including any session the attacker still holds. - Change passwords for hosting, admin, database and email, from a clean device, and turn on two-factor authentication.
- Follow our step-by-step hacked website recovery guide for cleanup, restoring and re-checking.
- Ask Google for a review after cleanup, using the steps in Google's hacked site guide.
For a hack involving payments or customer data, also talk to your payment provider and, if needed, a lawyer about notification duties.
Key takeaways
- Yes, websites can get hacked, mostly through outdated software, weak or stolen passwords and exposed logins.
- The first sign is often not a crash. It is spam pages, redirects or a browser warning, which can arrive days or weeks later.
- Catch it early: check admin users, file changes and what Google shows for your domain.
- Cleanup means removing the backdoor, not just the visible spam. Do that before you change passwords.
- Rankings and trust can recover after a proper cleanup, but prevention is cheaper.
A human look before it happens to you
If your site is not hacked, the best time to find weak spots is now. A Bug Circuit Essential audit costs $49 one-time. A real person tests one website by hand and sends a full written report with every issue, severity, evidence and fix steps. It is a small-site audit, not a multi-week enterprise pentest or a compliance certificate, and there is no ongoing monitoring. Fixing is separate: you can ask for a price per issue and pay only if you agree. If your site is already hacked, start with the recovery guide first.
A real human security engineer audits your whole site by hand and sends a full report: every issue, its severity, and the exact fix. From $49, with a 14-day money-back guarantee.