Guides / websites

WordPress Hacked: What Should You Do First?

By Ryan Goering, CEO, BaaDigi · Last updated November 2026 · 7 sources checked

If your WordPress site is hacked, do four things before anything else: write down what you see, tell your hosting provider, change every password, and make a backup before anyone starts cleaning. WordPress.org’s own guidance adds two steps owners skip: scan your own computer, because the infection often starts there, and reset the secret keys in wp-config so anyone still logged in is forced out[1]. Change the passwords again once the site is clean[1]. After that you have two routes. Clean the site and keep WordPress, or replace it with a new site that carries none of the old code. If Google has flagged the site, the warning only comes off after you fix every issue and request a review, which can take days or weeks[2].

BaaDigi replaces hacked WordPress sites with Next.js sites and does not offer cleanup, so we have a stake in the second route. Every outside fact below links to its source.

How do you know your WordPress site was hacked?

WordPress.org lists the clear signs. Any one of them is enough to act on[1]:

  • Google or Bing has blacklisted the site.
  • Your host has disabled the website.
  • The site has been flagged for distributing malware.
  • Visitors say their antivirus flags your site.

Owners usually notice something simpler first: the site sends visitors to another site, shows pages nobody wrote, or has user accounts nobody created.

What should you do in the first hour?

  1. Write down what you see and when: redirects, warnings, strange pages, emails from your host. You will be asked for it later[1].
  2. Tell your hosting provider. The problem may reach beyond your site, and they can see the server[1].
  3. Make a backup before cleaning, even of the hacked site, so nothing is lost if a cleanup goes wrong[1].
  4. Change every password: WordPress users, hosting, database and email. Use long, unique ones[1].
  5. Reset the secret keys in wp-config. That logs out anyone who is still signed in[1].
  6. Scan your own computer. WordPress.org says the infection often begins on the owner’s laptop or desktop[1].

Change the passwords twice. WordPress.org’s guidance is to change them again after you have made sure the site is clean[1].

For backups in general, WordPress.org recommends keeping at least three, stored in different places[3].

Should you clean the hacked site or replace it?

Cleaning removes the malicious code and keeps your WordPress site. Replacing builds a new site from your pages, wording and photos and leaves the old code behind.

Two ways out of a hacked WordPress site
Clean itReplace it
What happensMalware is found and removed from files and the databasePages, wording and photos are rebuilt as a new site
What staysWordPress, its login page, its plugins and its databaseNone of the old WordPress code
Ongoing workUpdates for WordPress and every pluginUpdates for the new platform
Fits whenThe site depends on WordPress plugins you cannot replaceThe site is mostly pages, photos and forms

Cleanup is a real service with published prices: Wordfence Care is $590 a year and Wordfence Response is $1,250 a year, and both include malware removal[4]. The full comparison, with more prices, is in our guide on whether to fix or replace a hacked website.

BaaDigi only does the second route. We replace a hacked WordPress site with a clean Next.js site in 48 to 72 hours from payment for sites up to 30 pages, on a custom quote. That timeline is what we work to, not a guarantee[5].

How do you get a Google warning removed?

Fix every issue listed in the Security Issues report in Google Search Console, then select Request Review[2]. Google says most reviews take several days or weeks[2].

Reviews for malware take a few days. Reviews for sites hacked with spam can take up to several weeks[6].

Do not request a review until the problem is fully fixed. Google’s guidance says asking while the problem still exists only prolongs the time your site is flagged as dangerous[6].

How do you stop it happening again?

Most of the risk sits in plugins. Of the 11,334 new vulnerabilities found in the WordPress ecosystem in 2025, 91% were in plugins and 9% in themes[7]. Attackers move fast: the median time to mass exploitation for heavily exploited vulnerabilities was 5 hours[7].

So the fix is either constant upkeep or fewer things to keep up. If you stay on WordPress, someone has to own updates every week. If nobody will, a site with no plugins and no public login has less to attack. Our guide on whether WordPress is secure goes through the numbers.

Frequently asked questions

What is the first thing to do when WordPress is hacked?
Write down what you see, tell your hosting provider, make a backup and change every password. WordPress.org also says to reset the secret keys in wp-config and to scan your own computer, because the infection often starts there.
Should I delete my hacked WordPress site?
Not before you back it up. Keep a copy of the hacked site and keep the hosting account open until a clean site or a replacement site is live, so no content is lost.
How long does a Google hacked-site warning last?
Until you fix every issue and Google approves a review. Google says most reviews take several days or weeks. Malware reviews take a few days, and reviews for sites hacked with spam can take up to several weeks.
Can a hacked WordPress site be replaced instead of cleaned?
Yes. The pages, wording and photos are rebuilt as a new site and the old WordPress code, plugins and database are left behind. BaaDigi does this in 48 to 72 hours from payment for sites up to 30 pages, on a custom quote, with no guarantee on the timeline.
Why do I need to scan my own computer?
WordPress.org’s guidance says that in many cases the attack begins on the owner’s own notebook or desktop, where saved passwords can be stolen. Cleaning the website without checking the computer can let the attacker straight back in.

Related reading

Sources

Every source was opened and read on the date shown. Vendor prices change; check the vendor's page before buying. How we research: methodology.

  1. WordPress.org documentation: FAQ, my site was hacked — checked 2026-11-24
  2. Google Search Console Help: Security issues report — checked 2026-11-24
  3. WordPress developer handbook: backups — checked 2026-11-24
  4. Wordfence: plans and pricing — checked 2026-11-24
  5. BaaDigi: WordPress security services for hacked sites — checked 2026-11-24
  6. web.dev: request a review of a hacked site — checked 2026-11-24
  7. Patchstack: State of WordPress Security in 2026 (2025 data) — checked 2026-11-24

Last updated: