What is malware, and how do I recover a hacked website?

Estimated reading: 5 minutes

Malware is malicious software that gets into a website and uses it for the attacker’s purposes: redirecting visitors to spam sites, stealing information, sending spam email, or damaging your search ranking. A hacked website can usually be recovered by taking it offline safely, cleaning or restoring from a known-good backup, updating everything, changing all passwords, and checking for hidden backdoors. Recovery takes care, but most small business sites come back fully.

The first sign is often something small: a customer says your site redirected them somewhere strange, Google warns visitors away, or you notice pages and users you did not create. Do not ignore those signs. The longer malware stays, the more damage it does, and the harder it is to clean.

Signs your website has malware

  • Visitors are redirected to unrelated sites, especially spam or adult sites.
  • Google shows a warning such as Deceptive site ahead when people try to visit.
  • Unknown admin users, plugins, or pages appear that nobody on your team created.
  • Your site sends spam email or your hosting provider warns you about outgoing spam.
  • Strange links or text appear in your pages, often hidden or in a language you do not use.
  • The site is suddenly very slow or your hosting account is using far more resources than usual.
  • Search results show odd titles or descriptions for your pages that you did not write.

One sign on its own can have an innocent cause, but two or three together usually mean the site is compromised. See how to fix common WordPress errors to rule out ordinary faults first.

Recovery steps

1. Do not panic, and do not delete things at random

Deleting files you do not recognize can break the site further and destroy evidence of how the attacker got in. Note what you see, take screenshots, and work in order.

2. Take the site offline or put it in maintenance mode

If visitors are being redirected or warned away, limit the damage. Put the site in maintenance mode so it stops serving malicious pages while you work. Tell your hosting provider what is happening; they may have tools or logs that help.

3. Scan the site

Use a reputable security plugin or your host’s malware scanner to find infected files. The scan will list files that were changed or added. Keep that list: it shows the scale of the problem and whether the infection is in one place or everywhere.

4. Restore from a clean backup if you have one

The fastest reliable recovery is restoring a backup made before the infection. This is why backups matter: a recent, tested backup turns a crisis into an afternoon’s work. See how to back up your website and restore it. If you have no backup, the infected files must be cleaned or replaced one by one, which takes longer and needs care.

5. Update everything and change all passwords

After cleaning or restoring, update WordPress, your theme, and every plugin. Then change every password connected to the site: WordPress admin accounts, hosting, FTP, database, and email. Remove any admin users you do not recognize. Turn on two-factor authentication for admin accounts.

6. Check for backdoors

Attackers often leave a hidden file that lets them back in after the visible infection is cleaned. A good security scan checks for these, but if the infection keeps returning, a professional clean is needed. This is the step most owners should not attempt alone.

7. Ask Google to re-check the site

If Google flagged your site, you can request a review in Google Search Console once the site is clean. Google will check it and remove the warning if it is satisfied.

Prevention after recovery

Once the site is clean, keep it that way: update promptly, use strong unique passwords with two-factor authentication, install only plugins you need, keep regular off-site backups, and use a security plugin that monitors file changes. Our guide to keeping your WordPress website secure covers the full routine.

If your site is hacked and you are not sure where to start, get help rather than guessing. Brainiac Business can help through General Small-Business IT Support, quoted by scope before work starts. See what IT Support covers, or open a ticket at the support portal. Tell us what you have seen and what you have already tried.

Frequently asked questions

How did my website get hacked?

Most often through an outdated plugin or theme, a weak or reused password, or a compromised account. Automated bots scan for these weaknesses constantly; the attack is rarely personal.

Will restoring a backup delete my recent content?

Yes, anything added after the backup was made will be lost in the restore. That is why frequent backups matter, and why you should save a copy of recent content before restoring if you can.

Can malware spread to my visitors?

It can redirect them or expose them to malicious downloads, which is why taking the site offline quickly matters. It does not normally infect visitors’ computers just from viewing a page, but redirects and downloads are a real risk.

How do I know the site is fully clean?

A clean scan from a reputable scanner, no further signs of infection over the following days, and no reinfection after passwords are changed and software is updated. If the infection returns, there is still a backdoor somewhere, and professional help is the right call.

Related reading: how to choose and manage WordPress plugins and what to do when your website is down.

Share this Doc

What is malware, and how do I recover a hacked website?

Or copy link

CONTENTS
Chat with us on WhatsApp