Website Hacked? Emergency WordPress Recovery Steps to Take Today

Finding out your WordPress website has been hacked is stressful. Visitors may be redirected to spam, Google may show a warning next to your listing, or your host may have suspended the account. The good news is that restoring a website after a hack is a lot easier when you follow a clear order of steps. This guide explains what to do first, how a proper malware cleanup works, how to remove SEO spam and Google warnings, and how to stop the same attack happening again.

Key takeaways

  • Act quickly, but do not delete files or restore old backups before you know what happened.
  • Take a full backup of the hacked site first, then change every password.
  • A proper cleanup removes malware, hidden backdoors, rogue users and SEO spam, then fixes how the attacker got in.
  • Only request a Google review once every page is clean. Google decides how long it takes.
  • Updates, two-factor login, a firewall and tested backups are the best protection against reinfection.

Signs your WordPress website has been hacked

Some hacks are obvious. Others stay hidden for weeks because attackers want to use your site quietly. Common warning signs include:

  • Visitors, especially on mobile or from Google, are redirected to unfamiliar sites
  • Google shows “This site may be hacked” in search results, or browsers display a red “Deceptive site ahead” page
  • Search results for your brand show pages in other languages, or spam about pharmacy, gambling or replica goods
  • Unknown admin users, new plugins or strange files appear
  • Your host suspends the account or reports high server load or outgoing spam email
  • The site suddenly slows down, shows errors or you cannot log in

If you see any of these, treat it as an emergency. The longer malware stays on a site, the more damage it can do to your customers, your search rankings and your reputation.

What to do in the first hour

The first steps are about containing the damage without destroying the evidence you need to fix it properly.

  1. Stay calm and do not start deleting. Removing random files can break the site and hide how the attacker got in.
  2. Take a full backup of the hacked site. Copy all files and the database. It feels odd to back up an infected site, but it gives you a safe point to return to and a record for investigation.
  3. Change your passwords. Update WordPress admin, hosting control panel, FTP or SFTP, database and email passwords. Use long, unique passwords for each.
  4. Tell your host. Many hosts can confirm what they have seen in server logs and may already have scanned the account.
  5. Consider maintenance mode. If visitors are being redirected to harmful pages, temporarily taking the site offline protects your customers while it is cleaned.
  6. Check Google Search Console. The Security Issues report shows whether Google has detected hacked content or malware, and which pages are affected.

The official WordPress guidance for hacked sites recommends a similar approach: stay calm, scan the site, involve your host and restore from a clean source where possible.

How hacked website recovery works

Running a single security plugin scan is rarely enough. Attackers usually leave more than one way back in. A thorough recovery follows four stages.

1. Assess the infection

Files and the database are scanned and compared with clean copies of WordPress core, themes and plugins. This shows which files were changed, what malicious code was added and roughly when the attack started.

2. Clean the malware and backdoors

Infected files are repaired or replaced with clean versions. Hidden backdoors, which are small scripts that let the attacker return, are found and removed. These are often disguised as normal file names or tucked into the uploads folder. Rogue admin accounts, malicious scheduled tasks and injected database entries are deleted too.

3. Close the way in

Cleaning without fixing the cause means the site is likely to be hacked again. Outdated plugins are the most common entry point. According to Patchstack’s State of WordPress Security report, 11,334 new vulnerabilities were found in the WordPress ecosystem in 2025, with 91% in plugins and 9% in themes. Only six were reported in WordPress core. Weak or reused passwords, nulled (pirated) themes and abandoned plugins are other frequent causes.

4. Verify and monitor

The site is rescanned, tested on desktop and mobile, and checked from outside to make sure no redirects or spam remain. Monitoring is then set up so any new problem is caught early.

Removing SEO spam and hidden pages

SEO spam hacks are designed to be hard to spot. Attackers create thousands of spam pages on your domain, or show spam only to search engines while you see a normal site. This uses your site’s reputation to rank their content, and it can badly damage your own rankings.

Cleaning up SEO spam usually involves:

  • Removing the code that generates or cloaks the spam pages
  • Deleting spam posts, pages and database entries
  • Checking your sitemap and robots.txt for unwanted changes
  • Looking for unknown owners or users added to Google Search Console
  • Letting removed spam URLs return a 404 or 410 status so Google drops them over time
  • Using the Removals tool in Search Console to hide the worst spam URLs from results while they drop out

After a spam hack, it is worth reviewing your rankings and technical SEO. Our SEO services can help you recover lost visibility once the site is clean.

Getting Google warnings removed

If Google has flagged your site, you need to request a review after the cleanup. Google’s guidance on requesting a review says you should clean the site, fix the vulnerability and bring the clean site back online first. Requesting a review too early only keeps the warning in place for longer.

Google gives these rough processing times:

  • Phishing: about a day
  • Malware: a few days
  • Sites hacked with spam: up to several weeks

Google says that if it finds the site is clean, warnings in browsers and search results are removed within 72 hours. No agency can promise faster removal, because Google makes the final decision. What a good recovery service can do is make sure the site is fully clean before the request, so it is approved first time.

Protecting your website against reinfection

Once your site is clean, these steps make another hack much less likely:

  • Keep everything updated. Update WordPress core, plugins and themes promptly, and remove any you no longer use.
  • Use strong logins. Unique passwords and two-factor authentication for every admin account.
  • Limit access. Give each person their own account with only the permissions they need, and remove old users.
  • Add a firewall. A web application firewall blocks many common attacks before they reach your site.
  • Keep tested backups. Automatic daily backups stored off the server, and check you can actually restore them.
  • Avoid nulled themes and plugins. Pirated software often contains malware from day one.
  • Monitor the site. Regular malware scans, uptime checks and Search Console alerts catch problems early.

Many business owners do not have time for this. A website maintenance and care plan covers updates, backups, security monitoring and fixes, so your site stays protected without you having to remember.

When to call in a professional

Some simple infections can be handled with a security plugin. You should get expert help if the site keeps getting reinfected, you see Google warnings or SEO spam, your host has suspended the account, the site takes payments or stores customer data, or you are not comfortable working with files and databases. A fast, business-safe response protects your customers and your rankings, and a backup taken before any changes means your content is not put at further risk.

Afai Pixel’s hacked website recovery and malware removal service covers malware and backdoor cleanup, SEO spam removal, Google warning review requests and security hardening, including on sites we did not build. For prevention tips, see our SEO basics checklist for business websites.

Frequently asked questions

Should I just restore an old backup?

Only if you know the backup is clean and you also fix the vulnerability. Many backups already contain the malware, and restoring without closing the way in usually leads to the site being hacked again.

Will I lose my content after a hack?

Usually not. A careful cleanup starts with a full backup and repairs infected files rather than wiping the site. Where files are badly damaged, they can be restored from the cleanest available copy.

How long does it take to remove a Google hacked warning?

Google says phishing reviews take about a day, malware reviews a few days and spam hacks up to several weeks. Once Google confirms the site is clean, it says warnings are removed within 72 hours.

Why does my site keep getting hacked again?

Usually because a backdoor was missed or the original weakness, such as an outdated plugin or stolen password, was never fixed. A full recovery removes every backdoor and closes the entry point.

Is your website hacked right now? Do not wait for the damage to spread. Contact Afai Pixel with your website address and a short description of what you are seeing. Our teams in Sri Lanka and the UK will check the site, explain what is involved and help you get back online safely.

Work with Afai Pixel

Ready to put this into practice?

Tell us about your project and we will suggest a clear, practical next step, from Colombo, Sri Lanka and the United Kingdom.