Fixing a hacked website requires identifying the breach, removing malicious code, and restoring security. You should immediately change all passwords, run a malware scan, and update all software. If you cannot clean the site yourself, you will need to restore it from a clean backup.
Assess the damage and secure your accounts
The first step in recovering a compromised website is to lock down all access points. Hackers often create rogue administrator accounts or insert backdoors into your hosting environment. You must immediately change the passwords for your website content management system, your web hosting control panel, your File Transfer Protocol accounts, and any connected database users. Use strong, unique passwords that combine letters, numbers, and symbols to prevent further unauthorized access.
Next, review your user account list and delete any unfamiliar accounts with administrative privileges. If your hosting account is compromised, the provider may have temporarily suspended your service to protect other users on the same server. Contact your hosting support team to verify the status of your account and find out if they can provide access logs to help you determine how the hackers initially got in.
- Change admin passwords for WordPress or other content systems
- Update passwords for web hosting and FTP accounts
- Remove any unknown administrator user accounts
- Contact your web host for server logs and status


Scan and clean malicious code
Once you have secured your accounts, you need to find and remove the malicious files that the hackers left behind. If your site runs on a platform like WordPress, install a reputable security plugin to run a comprehensive malware scan. These tools compare your core files against official repositories to detect unauthorized changes, hidden scripts, and spam injections.
You can also use an FTP client or your hosting file manager to inspect modified files manually. Pay special attention to your root directory, your upload folders, and system configuration files like .htaccess. Delete any unrecognized files or code snippets. However, manual cleaning can be risky if you miss hidden backdoors, which is why many site owners prefer restoring from a clean backup.
- Run a security plugin scan to detect malware
- Compare core files to official software versions
- Inspect upload folders for unauthorized executable files
- Check configuration files for hidden redirects


Restore from a clean backup
If the infection is extensive or you cannot locate all the modified files, the fastest and safest recovery method is restoring your website from a clean backup. Check your web hosting account or your third-party backup service for a version of your site created before the hack occurred. Rolling back to a previous state eliminates guesswork and ensures all malicious scripts are removed instantly.
After restoring the backup, update every single plugin, theme, and software core file to its latest version immediately. Vulnerabilities in outdated software are the most common entry points for hackers. Finally, implement ongoing security measures such as a web application firewall, two-factor authentication, and automated daily backups to protect your business moving forward.
- Locate a backup created before the hack happened
- Restore the database and website files from the backup
- Update all themes, plugins, and core software
- Install a security firewall and enable two-factor authentication


Signs your website has been hacked
Some hacks are obvious. Others stay hidden for weeks while the site quietly sends spam or redirects visitors. Look into it right away if you notice any of these:
- A browser or Google warning that the site is dangerous or “may be hacked”
- Visitors, especially on phones, getting sent to a different site
- Pages, products or links you did not create, often in another language or for pills, gambling or knockoff goods
- Admin users you do not recognize
- Strange pop-ups or ads on your pages
- A sudden traffic drop, or a spike from countries you do not serve
- Emails from your domain landing in spam folders
- A blank white screen, odd code at the top or bottom of pages, or a sudden slowdown
- A message from your web host saying your account was suspended for malware
A free online site checker can confirm what you are seeing. Run two different ones, because each tool catches different things, and none of them can see every file on your server.
Step 1: Contain the damage
Before you start cleaning, stop the hack from hurting more people. Put the site into maintenance mode or ask your host to restrict public access while you work. Write down what you saw and when you first noticed it, because those details help you or your host find the cause later. Try not to keep clicking the bad pages or redirects yourself.
Step 2: Save a copy of the hacked site
It feels backwards, but make a full backup of the infected site before you change anything: all files (including hidden ones like .htaccess and wp-config.php), the database and the server logs. Label it clearly as “hacked” with the date and store it apart from your clean backups so it never gets restored by mistake. This copy lets you trace how the attacker got in, and it protects recent orders, form entries or content that an older backup would not have.
Step 3: Lock out the attacker completely
Changing your main passwords is a good start, but attackers often leave other ways back in. A full reset includes:
- Passwords for hosting, the website admin, FTP or SFTP, SSH, the database, your domain registrar and the email linked to these accounts
- Any other account where you reused one of those passwords
- Logging out every active session and removing unknown users
- Revoking API keys, application passwords and any SSH keys you do not recognize
- On WordPress, generating new security keys and salts in wp-config.php, which signs everyone out
- Turning on two-factor sign-in for every admin account
- Running a full antivirus scan on the computers you use to manage the site, since malware on your own laptop can steal new passwords as fast as you change them
Step 4: Find out how they got in
If you clean the site but leave the hole open, it will usually be hacked again. These checks point to the cause:
- Ask your host for access and error logs from around the time the problem started. Look for repeated login attempts or requests to odd files.
- Sort your files by date modified. The earliest unexpected change is often close to where the attack began.
- Compare the versions of your plugins, themes and core software against known security problems. Outdated or abandoned plugins are a very common way in.
- Look in the database for unknown admins, injected scripts, spam links and changed settings.
- Check scheduled tasks (cron jobs) for anything you did not set up. Attackers use them to reinstall malware.
- If you have several sites in one hosting account, check all of them. One infected site can spread to the rest.
Be careful with code that just looks strange. Some legitimate plugins use compressed or encoded code, so confirm a file is malicious before deleting it. If the malware keeps coming back after cleanup, assume a hidden backdoor is still there.
Step 5: Clear warnings from Google and email blocklists
Once the site is fully clean and the hole is closed, deal with the reputation damage:
- Open the Security Issues report in Google Search Console. Fix every issue it lists, then request a review and explain what you removed and how you fixed the cause. Only request it when you are sure the site is clean.
- Check your domain with Google Safe Browsing to see if browsers are still flagging it.
- If your emails are going to spam, check whether your domain or server landed on an email blocklist and request removal.
- Clear your website cache, any CDN cache and your browser cache so visitors see the clean version.
Step 6: Test everything before you relaunch
- Run one more malware scan and repeat the checks from Step 4.
- Click through your main pages and menus looking for broken content or redirects.
- Test your contact forms, logins, password resets, search and downloads.
- If you sell online, place a test order and check payments and order emails.
- Make a fresh backup and label it as your clean recovery point.
- Keep a short record of what happened, how they got in and what you fixed. It makes the next problem, if there is one, much faster to solve.
If customer information may have been exposed
If your site stored customer details, such as names with account logins, payment information or other personal data, the hack may count as a data breach. Washington has a data breach notification law, and other states have their own. Talk to an attorney about what you are required to do. Either way, being open with customers protects trust better than staying quiet. Explain in plain language what happened, what information was involved, what you fixed and what they should do, such as changing their password.
When to call a professional
A simple hack on a small site can be cleaned by a careful owner. Get help if the malware keeps returning, if you cannot find a clean backup, if you run an online store or handle customer data, or if your host has suspended the site. Be wary of cleanup offers that seem too cheap, since a quick surface clean that misses a backdoor costs more in the long run. For ongoing protection, see how often a small business site needs updates and backups. If your Tacoma-area business site has been hacked, contact us and we can help.
Key takeaways
- Immediately change all admin and hosting passwords if your site is hacked.
- Run security scans to detect and remove malicious code injection.
- Restore your website from a clean backup if the infection is widespread.
- Update all software components to patch security vulnerabilities.
Related questions
How do I know if my website has been hacked?
Common signs include sudden traffic drops, strange pop-up advertisements, browser security warnings, unauthorized changes to your content, or receiving alerts from Google Search Console about malware.
Will Google penalize my hacked website?
Google may display a warning label in search results that says this site may be hacked to protect users. This can severely hurt your traffic until you clean the site and request a review in Search Console.
How can I prevent my website from getting hacked again?
You can prevent future attacks by keeping all software updated, using strong passwords, limiting login attempts, installing a security plugin, and setting up automated daily backups.
How long does it take to fix a hacked website?
There is no fixed time. A small site with a clean, recent backup can often be recovered in a day. A site that was infected for a long time, has no backup or has a hidden backdoor can take much longer, mostly because finding the entry point takes time.
Can I just restore a backup and be done?
Restoring removes the malware, but not the weakness that let the attacker in. You still need to change every password, update all software and close the entry point, or the site will likely be hacked again. Also scan the restored copy, since a backup can already contain malware.
Will my web host fix a hacked site for me?
It depends on the host and your plan. Many hosts will share logs and may offer scanning or cleanup tools, but on most basic shared plans, cleaning the website itself is your responsibility. Ask your host exactly what they cover.
Should I take my site offline while I fix it?
Usually yes. A maintenance page stops visitors from being redirected or infected and limits the damage to your reputation with Google. Bring the site back once it is clean, secured and tested.
