Website Hacked: The First Steps in 24 Hours

By · 13 November 2026 · 4 min read

Illustration of a website showing a danger warning, a clock and a checklist of recovery steps being ticked off

This morning a customer sends you a message: your website opens a gambling page, or Google shows a red warning when they try to visit. Panic is natural. But what you do in the first few hours matters a great deal: how much damage can be prevented, whether the evidence survives, and how long it takes for your website to be trusted again.

This article sets out the first steps in the 24 hours after a website is hacked, based on guidance from Google and WordPress. The focus is on what you can do as a business owner, together with your hosting provider or website vendor.

Signs your website has been hacked

"Hacked" can mean many things. The WordPress documentation lists some fairly clear signs:

  • The website is flagged as dangerous by Google, Bing or visitors' antivirus software.
  • Your hosting provider has disabled the website.
  • There are changes you never made, such as a new, unknown admin account.
  • Pages have changed, spam links have appeared, or visitors are redirected to another site.

If you see any of these signs, treat it seriously until proven otherwise. Sometimes it is just an ordinary server problem, and your hosting provider can help confirm that.

The first hour: stay calm, then write it down

The WordPress documentation recommends a first step that is often skipped: documenting. Before changing anything, write down:

  • What you are seeing, and why you think the website has been hacked. Keep screenshots.
  • When you first noticed the problem, including the time zone.
  • What has changed recently: a new plugin, a theme change, a change of vendor, or newly created accounts.

These notes become the basis of an incident report, whether you handle it yourself or with outside help. Don't rush to delete suspicious files. WordPress also recommends taking one copy of the website in its infected state before cleaning it, so there is material to trace what happened.

Limit the damage

  1. Contact your hosting provider. Google's guidance on web.dev recommends telling your host early. If you use shared hosting, the problem may involve other websites on the same server.
  2. Consider taking the website offline temporarily. Google recommends taking a hacked site offline so it stops serving harmful content to visitors. The notice page should be served from outside the hacked website, with a 503 status code signalling a temporary outage.
  3. Change every password. Not just the CMS admin, but also the hosting panel, FTP or SFTP, the database and any connected email. Do it for every user, not just your own account.
  4. Sign out active sessions. In WordPress, this is done by changing the secret keys in the configuration file, so anyone still logged in is signed out.
  5. Check the admin's computer. According to WordPress and Google, attacks sometimes start on the computer used to log in, for example through password-stealing software. Run a full antivirus scan on the devices used to manage the website.

Check whether personal data was exposed

Many company websites hold data about people: contact form submissions, customer accounts or job applications. If data like this may have been read or copied by the attacker, the matter is no longer purely technical.

Indonesia's Personal Data Protection Law (Law No. 27 of 2022), Article 46, provides that if there is a failure of personal data protection, the data controller must give written notice no later than 3 x 24 hours to the data subjects and to the supervisory agency. The notice must at least state what data was exposed, when and how, and the steps taken to handle it. In certain cases, the public must also be notified.

Whether what happened on your website falls under this, and when the clock starts, is best discussed with a legal adviser. What you can do now: list what data the website stores, and involve the people with authority in your company from day one.

Clean up and close the hole

Cleaning up without knowing how the attacker got in is the most common mistake. Google warns that more than one weakness may have been used, and knowing when the hack started helps you decide which backups are still clean. Common causes: weak or reused passwords, software that hasn't been updated, and an admin computer that was already infected.

  • Restore from a backup made before the hack, not the latest backup, which may already be infected. This is why backups should keep several versions, as covered in our article on the 3-2-1 backup rule.
  • Update all software: the CMS, plugins, themes and server software. Remove anything you don't use.
  • Check the list of users and remove any accounts you don't recognise.
  • Change the passwords once more after the website is clean. Google and WordPress both recommend this, then turn on two-step verification for every admin.

Back online, and restoring your standing with Google

If Google has flagged your website, check the Security Issues report in Google Search Console. It shows Google's findings, such as hacked content or malware, with sample page addresses.

Once every issue in that report is fixed across all pages, request a review with the Request Review button and explain what you fixed. Google says reviews can take from several days to several weeks. Don't request one before the website is truly clean, because that only lengthens the time your website is flagged as dangerous.

In the first 24 hours, the goal isn't to get the website back to normal straight away, but to stop the damage, keep the evidence and take back every account.

Once things have calmed down, use the experience to fix the basics. Start with the basic steps of company website security, or get in touch if you would like to talk about a website that is easier to maintain and secure.