Website Security

My Website Was Hacked — Here's Exactly What to Do

Step-by-step guide for business owners who have discovered their site is compromised. From immediate containment to full recovery and future prevention.

March 6, 2025 12 min read NextCode Solutions

Discovering your website has been hacked is one of the most stressful moments for any business owner. Your first instinct may be to panic — but what you do in the next few hours determines how much damage is done and how quickly you recover. This guide gives you a clear, step-by-step action plan.

Do Not Delete Everything

Your first instinct may be to delete all the files. Do not. You need the hacked files to understand what happened, which backdoors were left, and whether data was compromised. Delete without forensics and the attackers likely left hidden backdoors that will reinfect you within days.

Step 1: Take the Site Offline Immediately

Put your site into maintenance mode or take it down completely. A hacked site can spread malware to your visitors, damage your Google ranking, and get your domain blacklisted. The short-term pain of downtime is far less than the long-term damage of staying live while compromised.

Step 2: Change All Passwords

Immediately change passwords for: cPanel/hosting account, FTP/SFTP accounts, WordPress admin, database (MySQL/MariaDB), email accounts on the domain, domain registrar account. Use strong, unique passwords for each. Enable 2FA where available.

Step 3: Identify the Scope

Before cleaning, identify what was affected:

Step 4: Clean the Infection

Step 5: Find and Fix the Entry Point

If you do not fix how they got in, they will be back within days. Common entry points:

Step 6: Harden and Monitor

Step 7: Request Google Review

If Google has flagged your site, submit a review request via Google Search Console after cleanup. Typically takes 1-3 days. Do not skip this — blacklisting kills your organic traffic.

Related Reading

Need Help Cleaning a Hacked Site?

NextCode Solutions has cleaned dozens of compromised WordPress and PHP sites. We identify the entry point, remove all malware, and harden your site to prevent reinfection.

Get Emergency Help