THE LIBRARY · AN OWNER'S GUIDE
My WordPress site was hacked: what to do now and how to stop it happening again
The short answer: Don't delete anything yet. Make two backups of the site even though it's infected, take it offline behind a maintenance page, change every password (the WordPress login, your hosting panel, FTP or SFTP, and the database), and tell your host. Then restore a backup made before the hack if you have one, update WordPress and every theme and plugin, and change the passwords again. Once every page is clean, use Request Review in the Security Issues report in Google Search Console, which can take several days to several weeks.
A client tells a small law office that she searched for the firm, clicked the top result and landed on a page selling sketchy looking pills. Someone at the office opens the site on a desk computer, and it looks the way it always has. On a phone, coming in from Google, the hacked version of the site displays.
On the office computerThe usual page
On a phone, from GoogleThe hacked version
If that's your site, it's fixable, and the first move is to copy it before you touch anything. WordPress's own help page on hacked sites says "Stay calm," and a few lines later, "Yes, you will recover from this."1 The order you do things in matters more than how fast you do them, so let's start with your first hour of triage.
What should you do in the first hour?
StatusFlaggednext: Contained
- 1Copy it, infected and all
- 2Take it offline
- 3Change every password
- 4Call your host
The order matters more than the speed.
Don't delete everything.
In fact, don't delete anything. Not yet. WordPress's own page names the urge: "It might be tempting to purge everything and start over." You'd be throwing away the evidence of how someone got in. Google's advice runs the other way: "Make two backups of your site even though it's still infected." WordPress says the same, to take one more snapshot "even if it's infected," so that if the cleanup goes wrong you still have something to restore.
Then, stop the damage.
Google's first instruction is "Take your site offline so that it no longer serves content to users." For a site with real visitors, that means a maintenance page. Google describes one way to do it: "point your website's DNS entries to a static page on a different server that uses a 503 HTTP response code." If that sounds like a job for someone who isn't you, it probably is, and your host can often put up a holding page in a few minutes.
Change the passwords next.
Google says "Change the passwords for all site users and accounts." WordPress adds that "this includes changing all access points": the WordPress login, your hosting control panel, FTP or SFTP, and the database. It also advises a global password reset for all users, "especially administrators."
(It can be tempting to skip that step. Don't.)
Last, call your host.
Google's first step in building a support team is to tell your hosting provider that your site has been compromised. The reasons are practical. The host "can make sure their other customers weren't affected, and they can potentially help recover your site." On shared hosting, one hacked site can mean others are compromised too, and your host may already know before you ring.
(WordPress lists "Host has disabled your website" among the clear signs of a hack, which is one way to find out.)
If you work in a field with duties to clients, like law or health care, ask your own counsel what you owe anyone whose details might have been on the site. We are not lawyers, and we're not going to pretend to be. Call your counsel.
StatusContained
How do you know your site is hacked?
StatusContainednext: Confirmed
Sometimes a customer tells you. Often nobody does, because you look at your own site on your own computer and it seems fine. Google's help is blunt about why: "Cloaking makes cleaning a site more difficult by showing different content to different types of users." A hacked page can show the owner one thing and a search visitor another. Your browser can betray you too, as caching can obscure the issue by serving a stale version of your website.
So, check what Google sees.
Open Google Search Console, which is free once you've verified you own the site, and go to the Security Issues report. If there's a problem, Google says "you'll see a count of all security issues on your site at the top of the report."
It defines the category plainly: hacked content is "any content placed on your site without your permission because of security vulnerabilities in your site."
Google's help for hacked sites suggests looking at "example URLs where Google detected that your site has been hacked" as your starting list. The report says "Pages or sites affected by a security issue can appear with a warning label in search results," and the label you'll sometimes see on a search result is "This site may be hacked."
It stays on the result until the site owner asks Google to review it.
Two more checks cost nothing. Search Google for site:yourdomain.com, and Google says "This shows you all the pages on your site, including pages a hacker might have added." If you see pages you've never heard of, you have your answer. Then try the URL Inspection tool in Search Console, which shows a page the way Google fetched it.
WordPress's list of obvious signs includes one that doesn't need a tool: "Notice behavior that was not authorized (i.e., creation of new users, etc…)". Look at your Users screen. Write down any administrator you don't recognize before you touch it.
StatusConfirmed
How do you clean it up?
StatusConfirmednext: Cleaned
The tempting fix is to repair the pages you can see. A hack usually isn't in the pages, though. It sits in files and accounts behind them, and removing the visible damage while leaving a back door open is how the same spam comes back next week, and leaves you feeling like you're playing a painful game of whack-a-mole.
The cleanest route is a backup. Google's order of operations starts with a check: "First, check that your backup was created before your site was hacked." A backup made yesterday may already contain the infection. If you have a good one, Google says to "Restore the clean but outdated backup on your server." Then update everything, because that backup is old and the weakness that let the attacker in is probably still in it. Google: "Install any software upgrades, updates, or patches available." Update WordPress itself, every theme and every plugin.
If there's no clean backup, the work is harder. WordPress's guide says reinstalling WordPress core files is possible and advises replacing /wp-admin and /wp-includes, using FTP rather than the reinstall button inside the dashboard, because "hacks often introduce new files."
(It also lists scanner plugins. We can't guarantee they'll catch everything, so we won't endorse any of them.)
If you can't fix it yourself, Google recommends that you "consider enlisting a qualified professional to help you."
(We absolutely endorse that one.)
While you're in there, tidy up the accounts.
Remove any administrator you didn't create.
Remove plugins and themes you aren't using.
Google puts it as "Consider removing software the site no longer uses from your server (such as widgets, plugins, or applications)." WordPress's hardening guide says it more briefly: "if you are not using a specific plugin, delete it from the system."
Then, change the passwords again. It seems redundant, but the first time was to stop access. The second time was to ensure access stays controlled.
WordPress says "you need to change the passwords for your site after making sure your site is clean," and Google says "Change the passwords one more time for all accounts related to the site."
Remember, the first reset stopped the bleeding. This one locks out anyone who picked up a new password while the site was still infected. Both phases need to be done. Don't skip this.
You'll also want to scan the computer you use to log in. WordPress is direct about it: "In many instances, the source of the attack / infection begins on your local box." The password may have been taken from your own laptop.
StatusCleaned
- In the first hourStops access
- After the cleanupLocks out anyone who picked up a new password
Then scan the computer you log in from.
How do you get Google to remove the warning?
StatusCleanednext: In review
Cleaning the site doesn't clear the label by itself. You have to ask for that. Google says "When all issues listed in the report are fixed in all pages, select Request Review in the Security Issues report." Only the site owner can do it, which is why you verified the site in Search Console earlier.
Don't rush this one, wait until the work is done. Google warns that "requesting a review if the problem still exists will only prolong the period of time that your site is flagged as dangerous." A clean-looking home page isn't enough.
In the request, say what you did. Google's guidance for hacked spam: "For each category of hacked spam, include a brief explanation of how the site was cleaned." A few plain sentences work, like restored from a backup dated before the hack, updated WordPress and all plugins, removed an unknown administrator, changed every password.
StatusIn reviewnext: Cleared, when Google's review comes back
- Restored from a backup dated before the hack
- Updated WordPress and all plugins
- Removed an unknown administrator
- Changed every password
Send it once every page is clean, not just the home page.
Then wait. Google says "Most reconsideration reviews can take several days or weeks," and for spam specifically "can require up to several weeks to process." Google emails you when the review is received and again when it's done. (Neither email comes with a date attached, so there's no prize for refreshing the report every hour.)
StatusCleared
Why did this happen?
StatusClearednext: Cause found
Most hacks have excruciatingly boring causes, and Google lists them plainly. The biggest and most common: "Attackers actively seek out old software with vulnerabilities." Closely behind: "outdated or unpatched themes and plugins are a major source of vulnerabilities." A plugin installed for a contact form in 2021 and never touched again is exactly what that sentence describes.
(We can absolutely confirm that this is true. Any time that we've been asked to fix a hacked website, the vulnerability almost always happened because they had themes or plugins that were out of date.)
Google also warns: "Be extremely cautious of free plugins or themes from untrusted sites."
(This is especially true if you happen to be using nulled or cracked software on your site. If you don't know what that is, you probably didn't do it. If you do know what that is and you did it anyway, welcome to consequences.)
The second most common cause is a weak password. Google says "Attackers may get your password by guessing different passwords until they guess correctly," and advises "Use a unique password to prevent other accounts from being compromised." A password you use on three other sites counts as shared with all three.
If you have to bet on one cause, start with the first. Open your plugin list and look for anything you don't recognize, anything you've stopped using and anything with an update waiting. Finding one doesn't mean you were careless. It means the site needed regular upkeep, and it didn't happen fast enough.
To reiterate, that's the pattern we see too. The hacked sites we've been called in to fix nearly all had the same history: the owner had taken the updates on themselves, the updates lapsed, and a customer usually noticed first.
StatusCause found
A find means the upkeep lapsed, not that you were careless.
How do you keep it from happening again?
StatusCause foundnext: Upkeep owned
Treat the site as something that needs a monthly look. WordPress's hardening guide opens with the sentence worth keeping in mind: "What security is though is risk reduction, not risk elimination." You're lowering the odds, and no list buys a guarantee. The page's own recommendations are short:
Tick each one as you do it. Nothing is sent; ticks stay in this browser.
Somebody has to own those six items every month, whether it's your developer, your host or a maintenance plan.
The usual failure is that nobody does.
We'd add one item to the list: a security check on a schedule, not only after something breaks.
(It's also worth mentioning that as AI gets more and more capable, the attacks speed up, and become more frequent. You may need to consider a faster update cadence.)
StatusUpkeep owned
Is WordPress a bad choice for a small business?
No, and it would be a strange thing for us to say after quoting WordPress's own guides all the way down this page. WordPress is still very worth using. After all, it powers nearly 40% of all websites: W3Techs puts it at 39.4% on November 7, 2026.
WordPress publishes hardening advice and a recovery guide updated this year. Google, for its part, says "Every day, cybercriminals compromise thousands of websites," and doesn't pin that on a platform. It adds that "most major Content Management System (CMS) providers have detailed documentation on how to resolve hacked cases." WordPress is one of those, and one of the largest.
We don't have a source comparing how often different platforms get hacked, so we won't tell you WordPress gets hit more. What we can say is where the work sits. A WordPress site has a login page and add-ons, and keeping both current is a recurring job. Skip it for a year and you end up reading pages like this one. Do it, with updates, strong passwords, two-step login and backups, and a cleaned, updated WordPress site can be a perfectly good site to keep. The question to ask is whether anyone on your team is responsible for doing that work.
For what it's worth, no platform gets out of that job.
Cutting down attack surfaces is one of the main reasons we built our own platform, and even so, anything that runs code needs regular updates. The one near-exception is a site of hand-written HTML and CSS with no framework or plugins, which is how we build Static sites.
- A login pageKeep current
- Add-onsKeep current
- Updates
- Strong passwords
- Two-step login
- Backups
The question is who on your team does it.
Where we fit
A cleanup is mostly work for your host and a developer, following the steps above, and our pages don't price a hacked-site cleanup as a service. If your site is working again, it's patched and someone owns the monthly upkeep, you're done, and you don't need to change platforms either.
Care, our ongoing plan, covers sites we build: "Hosting, SSL, nightly backups, security and uptime monitoring, plus one small change a month," with a 12-month minimum, then 30 days' notice.
If your site keeps getting hacked, or you'd rather not have a login page and a stack of plugins to look after, rebuilding is the other path. We do rebuild sites we didn't originally build. Our pricing page says "Usually; we keep what works and fix what doesn't," and "When we rebuild a site, we handle the move too: we redirect your old pages to the new ones, point your domain at the new site and resubmit it to Google Search Console." A static site has no admin login or plugins to attack, which takes away the usual ways in (it doesn't make anything unhackable, all servers can be compromised).
- Working again, patched, and someone owns the upkeepYou're done
- It keeps getting hackedRebuild
Either way, the cleanup itself is work for your host and a developer.
If you rebuild with us, it's usually one of these options:
AWabbit Launch- The terms
- Launch is $1,200, built on proven layouts and live seven days after we have your content, guaranteed. It runs on Care at $100 a month.
- Yours
- Your content and your domain are yours, and they go with you if you leave.
- Ours
- The template build is ours while you're on Launch, because it runs on our layouts and our hosting.
- If you leave
- If you leave with your account paid in full, we hand you a copy of the site for your next developer to move.
BWabbit Static- The terms
- Static is $2,750, paid half to start and half at go-live. It's custom-built and yours outright, with a go-live date in writing on day one, inside two weeks.
- Yours
- It's yours outright the day it launches: the build, the content and the domain, source code included.
- Ours
- Only the upkeep. Care covers hosting, SSL, nightly backups, security and uptime monitoring, and one small change a month.
- If you leave
- After Care's 12-month minimum, give 30 days' notice and the site goes with you, source code and all.
Every site we build runs on Care, from $100 a month, with a 12-month minimum and then 30 days' notice.2
- Hosting
- SSL
- Nightly backups
- Security and uptime monitoring
- One small change a month
See the replacement before you spend a dollar
Put your current site in the form and tell us what isn't working. Within three business days we'll send a mockup of your new home page at a private link, along with the build we'd recommend. It's free and commits you to nothing.

- 1Copy it, infected and all
- 2Take it offline
- 3Change every password
- 4Call your host
The order matters more than the speed.