Website Hacked? 8 Steps to Recover Quickly

If your website got hacked, start with damage control. Take the site offline, call your host, and change every password. Then find the infection, clean it or restore a clean backup, and fix the weak spot so it can't happen again. Most small business sites can be back up within a day or two.

Updated 26.11.2026 · 5 min read

Key points
  • Contain first: take the site offline and call your host before you start cleaning.
  • Change every password, including hosting, CMS, FTP, database, domain registrar, and email.
  • Save a copy of the hacked site, then clean it or restore a backup you've confirmed is clean.
  • Find and fix how the attacker got in, or you'll likely be hacked again within weeks.

How do you know your website was actually hacked?

Some hacks are obvious. Others stay hidden for months while your site sends visitors to spam pages. Check for these common warning signs before you assume the worst or dismiss the problem.

If you see one or more of these, treat it as a hack until you can prove otherwise. A broken plugin can look similar, but redirects and unknown admin accounts almost never happen by accident.

  • Visitors get redirected to gambling, pharmacy, or adult sites, often only on mobile or only from Google.
  • Google shows "This site may be hacked" in search results, or Chrome shows a red warning screen.
  • Search results for your site list pages in Japanese or other languages you never published.
  • Your host suspended your account or emailed you about malware or spam emails sent from your server.
  • New admin users, files, or pages appear that nobody on your team created.
  • Your homepage was replaced with a message, or you can't log in anymore.

Steps 1–2: Document the damage and contain it

Step 1: Take screenshots before you change anything. Capture the warning screens, strange pages, redirects, and any emails from your host. Note the date and time you first noticed the problem.

Step 2: Contact your hosting company right away. Ask them to check server logs, scan for malware, and tell you when the suspicious activity started. Many hosts have a security team and can quarantine infected files for you.

While you wait, put the site into maintenance mode or ask your host to take it offline. This protects your visitors and stops more damage to your Google reputation. A temporary page with your phone number keeps customers reaching you.

Step 3: Change every password and lock down access

Assume every login connected to the site is compromised. Change passwords from a clean computer, not the one you suspect may be infected. Use a password manager and make each password unique.

Turn on two-factor authentication everywhere it's offered. While you're logged in, remove any user accounts you don't recognize. Also remove old accounts for former employees or past web designers.

  • Hosting control panel (cPanel, Plesk, or your host's dashboard)
  • Website admin (WordPress, Wix, Squarespace, Shopify, etc.)
  • FTP and SFTP accounts
  • Database password (update it in your site's config file too)
  • Domain registrar, such as GoDaddy, Namecheap, or Cloudflare
  • Business email accounts, and check for new forwarding rules
  • Payment and booking integrations connected to the site

Steps 4–5: Save a copy, then find the infection

Step 4: Download a full backup of the hacked site before you clean anything. This feels odd, but it matters. If cleanup goes wrong, you can still recover your content, and investigators can see what was changed.

Step 5: Scan the site to find what the attacker did. Free tools give you a quick first look, but they only see what's visible from outside. A server-side scan finds more.

Pay special attention to files changed recently. Hackers often hide code inside legitimate-looking files, like a theme's functions file or a fake plugin folder.

  • Google Search Console: open the "Security issues" report to see what Google detected.
  • Sucuri SiteCheck: a free external scan for malware and blacklist status.
  • Wordfence or a similar plugin: scans WordPress core, theme, and plugin files from the inside.
  • Your host's malware scanner, which often has access to logs you can't see.
  • Your DNS records at the registrar, since some attackers change them to redirect email or traffic.

Step 6: Clean the site or restore a clean backup

Restoring a backup is usually the fastest fix. The catch is that it must be from before the hack started. Many owners restore last week's backup, only to find it was already infected.

Use the date from your host's logs to pick a backup safely before the break-in. After restoring, scan again right away. Any content you added since that backup will need to be re-entered by hand.

If you have no clean backup, the site needs manual cleanup. On WordPress, that means replacing core files, reinstalling plugins from official sources, and checking the database for injected code. If you're not technical, hire a professional. One-time cleanup services typically cost a few hundred dollars.

Step 7: Close the hole the attacker used

Cleaning without fixing the cause is the most common mistake. If the weak spot stays open, automated bots will find it again. That often happens within days.

Most small business hacks come from a few predictable causes. Work through them one by one.

  • Outdated plugins or themes: update everything, and delete any you don't actively use.
  • Nulled or pirated premium plugins: remove them, since they often ship with hidden backdoors.
  • Weak or reused passwords: already handled in Step 3, so keep 2FA on for good.
  • Old software: make sure your server runs a supported PHP version, and ask your host if unsure.
  • Too many people with admin access: give staff editor roles instead of full admin rights.
  • No automatic backups: set up daily off-site backups so the next recovery takes minutes, not days.

Step 8: Clear Google warnings and tell people who were affected

Once the site is clean, open the Security issues report in Google Search Console. Click "Request Review" and briefly explain what you fixed. Reviews often finish in a few days, though some take longer.

Check whether your domain is on email blacklists, because hacked sites often send spam. If customers report your emails landing in spam, your host can help with delisting. Also check Bing Webmaster Tools if you get traffic from Bing.

If customer data may have been exposed, such as form submissions or account details, you may have legal duties to notify them. Rules vary by state and country, and timelines can be short. This is not legal advice, so talk to a lawyer if personal data was involved. If you use a hosted checkout like Stripe or Square, card numbers usually never touch your server, which limits that risk.

Should you repair the hacked site or rebuild it?

Sometimes cleanup isn't worth it. If the site is several years old, runs abandoned plugins, and nobody knows how it was built, repairs often become a cycle. You fix one thing and something else breaks or gets hacked again.

A rebuild makes sense when cleanup quotes exceed the site's value, or when the design was already hurting your business. A simple, modern site with fewer moving parts gives attackers far less to exploit. For example, a plumber's five-page site rarely needs twenty plugins.

If you go that route, you don't have to stay offline for weeks. Services like Fittedsite build a finished site that goes live in 48 hours, for $690 one-time or $49/month. You only pay after you approve a free live preview.

FAQ

Questions, answered.

Can I recover my website after it was hacked?

Yes, in most cases. Restoring a clean backup or having a professional remove the malware usually gets you back online. Your text and images can almost always be recovered, even if the code needs rebuilding.

How much does it cost to fix a hacked website?

Professional malware cleanup typically costs a few hundred dollars for a small business site. Complex or heavily infected sites can cost more. Ongoing security subscriptions that include cleanup are also common.

Will a hack hurt my Google rankings?

It can, especially if Google flags your site or indexes spam pages. Rankings usually recover after you clean the site, remove spam URLs, and pass Google's security review. Acting quickly limits the damage.

Should I pay a hacker who demands money?

No. Paying gives no guarantee you'll get your site back, and it marks you as a target. Restore from backup or rebuild, and report the extortion attempt to local law enforcement or the FBI's IC3 if you're in the US.

Live preview · free · 10 seconds

Your new website is ten seconds away.

Type your business name, pick a style, and see exactly what your customers will see.

Money back if you don't love itLive in 48 hoursDomain & hosting included
your-business.com
    ✎ Tip: click any text in the preview to change it
    This website is ready for .Live in 48 hours · $690 once or $49/month · money back if you don't approve

    Sample text, numbers and reviews are placeholders – your site uses your real details and reviews.

    Claim 's website

    Pay now and we start today – or reserve and pay after you approve your final website.

    Secure payment by Stripe · cards, Apple Pay, Google Pay · full refund if you don't approve your final website.

    Love it
    or your
    money back

    Your website is reserved.

    We have everything we need to start. Watch your inbox – your final preview arrives within 24 hours.