My website was hacked, what do I do? The first hours step by step
What to do in order when a site is hacked. Taking it offline, keeping evidence, restoring a clean backup, the Search Console review and the Turkish KVKK notice.


If the site holds customer data or passwords, the first thing to do is take it offline right away. Then tell your hosting company, change every password and go back to a clean backup. The longer you wait, the more the damage can grow. The real work, though, is preventing a hack in the first place. This note covers the order of steps after a hack, and prevention comes at the end.
Why take the site offline immediately?
If the site holds customer details, order history or user passwords, every minute it stays open raises the chance that data ends up with someone else. Visitors may also be sent to malware or a fake page. Show a temporary maintenance page, or ask your host to take the site offline. That stops the incident from growing and buys time for the next steps. Keep in mind that taking the site down doesn't fix anything. It only limits the damage.
How do I keep the evidence?
Before you delete anything, write down what you see. WordPress's guide on hacked sites makes this the first step. Note what you are seeing, when you noticed it and what you changed recently, for example whether you installed a new plugin. Take screenshots. These notes are very useful to your host and to whoever takes on the clean-up. Before you start cleaning, also take a copy of the infected site as it is. The guide recommends this even if the copy is bad, because you will have a reference if things go wrong.
Why should I tell my hosting company?
On shared hosting the attack may have affected not only your site but others on the same server. Your host can confirm what happened, take steps on their side and pull the access logs. If spam was sent from your site, its IP address may also have landed on a blacklist, which they will see too. Don't forget to scan your own computer. According to the guide, some attacks start with malware on the owner's machine that steals FTP and admin passwords.
How do I change the passwords?
Change every access point, not only the WordPress admin password. That means FTP or SFTP, the WordPress dashboard, the hosting panel and the database. Every user with access to the site should be reset. The guide also says to renew the secret keys in wp-config.php, which logs out everyone who is currently signed in. Choose long, unique, random passwords and turn on two-step verification if you can. One more detail matters. Change the passwords again once the clean-up is finished, because if the attacker was still on the site during the first change, they may have seen the new password too.
How do I restore a clean backup and close the hole?
If you have a clean backup, going back to it is the shortest road. Make sure the backup predates the hack, or you will restore the malicious code with it. With no backup, the clean-up is done by hand. For that, WordPress's guide recommends re-uploading the wp-admin and wp-includes folders over FTP or SFTP, in exactly the version you use. Don't use the reinstall option in the dashboard, because those installers often only overwrite existing files and leave behind any new files the attacker added. Look closely at the .htaccess file, which the guide says is one of the files most often altered in attacks. If files such as index.php, header.php and footer.php were changed, they affect every page.
Going back is not enough on its own. You have to find where the attacker got in, which is often an outdated plugin or a weak password. If you restore without closing the hole, they come back through the same door. Finding and closing the way in is the core of our hacked website clean-up work. After the clean-up, update WordPress, the plugins and the theme, and delete the ones you don't use. To know that your backup really works, see how to test a website backup.
What does Google Search Console show, and how do I request a review?
If a site is hacked, Google shows it in the Security Issues report in Search Console. According to Google's help page there are three headings, hacked content, malware and social engineering. When you open the example URLs in the report, Google says not to open infected pages directly in a browser. You request a review from the Security Issues report only after every listed issue has been fixed on all pages. The request should explain what the problem was, what you did and the result. Don't send a new request while one is pending, because that can lengthen the process. A review can take from a few days to a few weeks.
To get ahead of this, turn on Search Console messages and forward them to your email. Google recommends it, along with an occasional site: search to see whether pages you didn't create have appeared.
When must I notify the KVKK if personal data leaked?
This section covers Turkey's data protection law. If personal data left your site, for example a customer's name, email or address, you have a notification duty as the data controller. According to the KVKK's data breach page, the Board has interpreted the law's phrase as soon as possible to mean 72 hours. You must notify the Board without delay and within 72 hours at the latest of learning about the breach. If you can't make it for a justified reason, you also explain the cause of the delay. The notice goes through the authority's online breach notification form, and you can send the information in stages if it is incomplete. Affected people are told as soon as reasonably possible. Record the facts of the breach, its effects and the measures you took. If your hosting or software provider acts as a data processor, it must tell you without delay once it notices a breach. If anything is unclear legally, speak to a lawyer.
What prevents a hack in the first place?
Update on time, delete plugins you don't use, use long unique passwords, turn on two-step verification and test your backups regularly. WordPress's hardening guide goes through the details, from file permissions to protecting wp-config.php. If you want vulnerability monitoring handled for you, we do that on a regular schedule too.