Cybersecurity3 June 20267 min read

How to Fix a Hacked Website (Step-by-Step)

Has your website been compromised? Don't panic. Follow these exact steps to clean the malware and secure your site.

Step 1: Take the Site Offline and Backup

Before you touch anything, make a complete backup of your files and database. Then, put your site in maintenance mode to protect your visitors.

Step 2: Scan for Malware

Use tools like Wordfence or Sucuri SiteCheck to identify malicious files. Look for weird PHP files in your uploads folder or base64 encoded strings in your headers.

Step 3: Clean the Code

Replace core CMS files with fresh copies. Manually inspect your theme and plugin files. If you aren't a developer, this is where you should hire a professional.

Step 4: Change All Passwords

Update your hosting, FTP, database, and admin passwords immediately.

Step 5: Resubmit to Google

If Google blacklisted your site, use Google Search Console to request a review once the site is clean.