WordPress Site Hacked? What to Do Next (and How to Stop It Happening Again)

WordPress Site Hacked? What to Do Next (and How to Stop It Happening Again)

Meta description: WordPress site hacked? Learn what to do first, how to remove malware safely, restore Google visibility and protect your site from future attacks.

A customer emails to say your site is trying to sell them pills. Google shows a warning beneath your listing. Or your homepage suddenly sends visitors somewhere unfamiliar. Discovering a hacked WordPress site is unsettling, but it is fixable. The first thing to do is stay calm: deleting files or reinstalling WordPress in a rush can destroy useful evidence and leave the real problem behind.

Why WordPress sites get hacked (and why it is rarely WordPress’s fault)

WordPress itself is only one part of a site’s software. Plugins and themes add features, but they can also introduce vulnerabilities that attackers exploit, particularly when a fix has been released and not yet installed.

Patchstack’s State of WordPress Security 2026 report found 11,334 new vulnerabilities in the WordPress ecosystem in 2025, 42% more than in 2024. Of these, 91% were in plugins and 9% in themes. Only six were reported in WordPress core, and those were low priority. Some 1,966 vulnerabilities (17%) were high severity, while 46% had no developer fix available in time for public disclosure.

The gap between a fix being published and your site being updated matters. For heavily exploited vulnerabilities, the weighted median time from disclosure to mass exploitation was about five hours. Roughly half of high-impact vulnerabilities were exploited within 24 hours. Keeping software current is one of the most effective ways to reduce that window.

Warning signs your WordPress site may be compromised

Look out for changes that you can see, and signals that might be less obvious:

  • A browser displays a “dangerous” warning or an interstitial warning page.
  • Google shows a warning beneath your search listing.
  • Visitors are redirected to unfamiliar sites, sometimes only when arriving from search.
  • New admin users, plugins or pages appear without your knowledge.
  • A Google search for site:yourdomain.co.uk reveals pages you did not create.
  • Your domain appears on spam blocklists, or your site sends unusual volumes of email.
  • Traffic suddenly collapses or your server load rises unexpectedly.
  • Googlebot appears to see spam or content that you cannot see yourself.

That last behaviour is known as cloaking: an attacker may show one version of a page to search engines and another to human visitors. They may also hide malicious content from logged-in site owners. So “it looks fine to me” does not prove the site is clean.

A browser window with a warning symbol over a dark dashboard, surrounded by bright colour bursts

What to do in the first hour

  1. Contact your hosting provider. Tell them you suspect a compromise and ask them to preserve relevant logs. Take a full backup of the site, including its files and database, as evidence.
  2. Avoid wiping the site for now. If possible, preserve the current state until you know what happened. A rushed clean-up can remove information needed to identify the entry point.
  3. Change passwords from a clean device. Start with hosting and email accounts, then WordPress admin. Avoid reusing passwords, and revoke access for unfamiliar users.
  4. Reduce harm to visitors. If the site is actively redirecting or exposing customers to risk, put up a holding page or maintenance message while the issue is investigated.
  5. Tell the right people. Work out who in your business needs to know (such as your internal technical contact, communications lead or payment provider) based on what the site does and what may have been affected.

Hands typing on a laptop, with glowing shield and key icons against a dark, colourful background

The recovery process, step by step

A proper WordPress hack recovery is more than removing the visible spam. The process should include:

  1. Find the likely entry point. Review plugin and theme versions, access logs, admin accounts and recent file changes.
  2. Choose clean-up or rebuild. A known-good backup can be a sound starting point if it predates the compromise. On a badly infected site, rebuilding from clean files and restoring verified content is often safer and faster than trying to repair every affected component.
  3. Remove backdoors as well as visible malware. Backdoors let an attacker regain access after the obvious payload has gone. A scan alone may not find every route in.
  4. Reset credentials and secrets. Rotate passwords, WordPress security salts and relevant API keys. This helps invalidate old sessions and credentials that may have been exposed.
  5. Remove unused software and update the rest. Delete plugins and themes you do not need, then update the retained software to current versions.
  6. Rescan and monitor. Check for suspicious files, users, redirects and activity after clean-up. Watch for reinfection rather than assuming the first clean scan is the end.
  7. Restore normal site functions and search visibility. Test forms, email and payments before reopening fully. Once the site is clean, address any search warnings and request a review.

Why clean-up is harder than it used to be

Modern malware does not always arrive as an obvious new file. It can be hidden as a malicious snippet inside a legitimate WordPress core, plugin or theme file, so simply deleting “the bad file” may not work.

Some campaigns deliver different content to search engines and AI crawlers than to people. Others run in server memory and reinfect files such as index.php or .htaccess after a clean-up. A site can therefore appear clean and be compromised again within minutes.

Patchstack also found in its tests that hosting security stacks blocked only 26% of vulnerability attacks. Hosting protections are a valuable layer, but they do not replace prompt patching and a thorough clean-up.

Glowing code-file blocks with a hidden infected fragment among clean files, on a dark background

Getting off Google’s warning list

Open the Security issues report in Google Search Console. It identifies issues such as hacked content, malware, social engineering and deceptive pages. Use the sample URLs to investigate, but remember they are examples, not necessarily a complete list. Fix the problem across the whole site, not only on the URLs Google shows.

Use Search Console’s URL Inspection tool to check how Google sees a page, and search Google for site:yourdomain.co.uk to look for pages you did not create. When every reported issue has been fixed and tested, select Request Review in the Security issues report and describe what you did. Reviews usually take days to weeks; do not submit another request while one is still being reviewed. See Google’s Security issues report guidance.

How to make sure it does not happen again

Good WordPress security is a set of practical layers, not a single tool. To help secure your WordPress website:

  • Apply security updates within hours where possible, not weeks. As of 23 November 2026, WordPress 7.1.5 is a security release that WordPress recommends installing immediately. Version 7.2 is planned for 8 December, with release candidates already available, so another update round is approaching.
  • Remove plugins and themes you no longer use. Give each person their own account and only the access their role requires; avoid shared admin logins.
  • Enable two-factor authentication for WordPress admin and hosting accounts. Disable file editing from the WordPress dashboard.
  • Keep off-site backups of files and the database, and test that you can restore them.
  • Use file-change and uptime monitoring, plus a firewall or web application firewall (WAF) in front of the site.
  • Test updates on a staging site first if your website is busy or business-critical.

A secure website dashboard behind a glowing padlock, with a steady uptime line and vivid paint splashes on a dark background

For more detail, see the WordPress hardening guide. Our article on WordPress maintenance routines covers the wider processes that help keep your site dependable.

WordPress maintenance services or DIY?

Good wordpress website maintenance is less about any single task and more about whether the boring work actually happens on time, every time, including the weeks when everyone is busy.

DIY can be a sensible choice for a small brochure site if you have someone technical in-house, reliable backups and time to respond within hours of a security release.

A WordPress maintenance plan may be a better fit if your site handles sales or leads, you manage several sites, there is no technical owner, or no one can cover updates during holidays or illness. The right choice depends on the value of the site and the time and skills you can give it. Good WordPress support services should make responsibilities clear and give you a dependable route to help when something goes wrong.

How Casper Creative handles WordPress security and recovery

Casper Creative provides UK-based cloud VPS hosting dedicated to your site, with a 99% uptime SLA. Our hosting, maintenance and support service includes weekly off-site backups of website files and daily database backups, retained for at least two weeks; SSL; proactive monitoring and alerts; and managed software, security and server updates.

Clients also have priority helpdesk access, with support within two working days for general issues and immediate help for critical ones. An annual performance report helps you review how your site is doing. Our wider website projects follow the 4D Process: Discover, Design, Develop, Deliver, and ongoing support continues after launch.

Explore our hosting, maintenance and support service

Frequently asked questions

How long does it take to recover a hacked WordPress site?

There is no fixed timeframe. It depends on how deeply the site is infected and whether a clean backup exists. A straightforward clean-up can take days; a rebuild and Google review can take longer.

Can you fix a hacked WordPress site yourself?

Yes, if you are comfortable working with files, databases and logs, and have a clean backup. The main risk is a partial clean-up that removes visible malware but leaves a backdoor behind.

Will Google remove my site from search results after a hack?

Google may display warnings in search or in the browser. Once you have fixed and verified the issue, submit a review request through Search Console. Reviews usually take days to weeks.

If you are dealing with a hack now, or want to know your site is covered before it happens, get in touch with Casper Creative. Let’s work out the next practical step together.

Filed Under
Share Article
More Recent Posts

More from Casper Creative

Let's get started

Ready to elevate your brand or website and accelerate your business? Let’s bring your project to life. Contact us now for a consultation that could redefine your digital presence.