Skip to content
Home / Blog / Maintenance & Support

Website Hacked? What to Do Right Now, Step by Step

Website hacked or showing a malware warning? Steps to contain the damage, clean the site, close the hole and restore Google trust, or let Elevenmonk fix it.

If your website has been hacked, act quickly but calmly: change all passwords, take a copy of the current state, put the site into maintenance mode if it is harming visitors, then clean the infected files and database, close the security hole and ask Google to review the site if a warning appeared. Speed matters because a hacked site can damage customer trust and search rankings within days.

Here are the steps in order.

How do you know your website has been hacked?

  • A browser or Google shows a "This site may be harmful" or "deceptive site" warning
  • Visitors are redirected to spam, betting or adult sites, often only on mobile
  • Google search shows pages you did not create, often in other languages
  • New admin users, unknown files or strange scheduled tasks appear
  • Your host suspends the account or reports malware
  • The site suddenly becomes very slow or sends spam email

Step 1: Secure access

Change passwords for the hosting panel, FTP or SSH, database, CMS admin accounts and email. Remove any admin users you do not recognise. Turn on two-factor login wherever possible.

Step 2: Back up the hacked state

Download a copy of files and database before changing anything. It helps to find the entry point and ensures you do not lose content during cleanup.

Step 3: Contain the damage

If visitors are being redirected or infected, put up a maintenance page. Tell your host; some can isolate the account or provide scan results.

Step 4: Clean the site

Replace core files with fresh copies, remove unknown files, scan themes and plugins, clean injected code in the database and remove spam pages. Restoring a clean backup from before the hack can be faster, but only if you know when the infection started.

Step 5: Close the entry point

Most hacks come through outdated plugins or themes, weak passwords, nulled premium plugins or insecure hosting. Update everything, delete unused plugins and themes, and fix file permissions. Without this step, the attacker usually returns.

Step 6: Recover search trust

Check Google Search Console for security issues and manual actions. After cleaning, request a review. Remove spam URLs from the index by letting them return 404 or 410, and resubmit your sitemap.

Step 7: Prevent the next attack

Set up daily off-site backups, a firewall, malware monitoring, login protection and a tested update routine. This is exactly what a website maintenance service provides. See the WordPress maintenance guide if your site runs on WordPress.

Get your hacked website fixed by Elevenmonk

Elevenmonk cleans hacked websites, finds and closes the entry point, handles the Google review and then keeps the site secure with ongoing maintenance. Message us on WhatsApp or contact us with your website address, and mark it urgent.

Frequently asked questions

Will my Google rankings recover after a hack?

In most cases, yes, once the site is cleaned, spam pages are removed and any warning is cleared through a review. The faster you act, the less damage is done.

Can I just restore a backup?

Only if the backup is from before the infection and you also fix the entry point. Otherwise the site is likely to be hacked again.

Why does the hack only show on mobile or from Google?

Many attacks show spam only to search visitors or mobile users to avoid detection by the owner. That is why scanning and Search Console checks matter.

How long does a hacked website cleanup take?

Simple infections can be cleaned within a day. Complex or repeated infections, or sites with no clean backup, take longer. Elevenmonk gives an estimate after the first scan.

/ Talk to Elevenmonk

Ready to start? Talk to Elevenmonk.

Tell us what you are planning. A founder or senior engineer replies with clear next steps, from our team in Mumbai, for clients across India and worldwide.

Prefer to share your idea in writing? Use the free project brief builder: answer a few questions and send the brief on WhatsApp in one tap.

WhatsApp us