There’s a particular kind of cold feeling that comes with opening your own website and seeing something that isn’t yours. A page full of casino ads. A redirect to a site selling pills. A red Google warning telling visitors your site is dangerous. Or a message from a reader saying, “Hey, your blog just sent me somewhere weird.”
If that’s where you are right now, take a breath. A hacked WordPress site is stressful, but it’s fixable, and most small sites recover fully, rankings included, when the clean-up is done properly. This guide walks you through it calmly, in order, without assuming you’re a developer.
Signs Your WordPress Site Has Been Hacked
Sometimes a hack is loud. Often it’s sneaky, designed to stay hidden from you while it uses your site’s reputation. Watch for:
- Redirects to spammy sites, sometimes only for mobile visitors or people arriving from Google, so you may not see it when you type your own URL.
- Strange pages in Google, such as Japanese or pharma keywords when you search site:yourdomain.com.
- A “Deceptive site ahead” or “This site may be hacked” warning in Chrome or Google search results.
- Admin users you don’t recognise, or you suddenly can’t log in at all.
- New files or plugins you didn’t install, often with random names.
- Your host suspending the account or emailing you about malware or spam being sent from your server.
- A sudden drop in traffic, or a security alert in Google Search Console.
Your First-Hour Checklist
- Stay calm and don’t delete things at random.
- Contact your hosting provider and tell them what you’re seeing.
- Change your WordPress, hosting, FTP and database passwords.
- Take a backup of the hacked site before you change anything else.
- Put the site into maintenance mode if visitors are being redirected.
- Then begin the clean-up below, step by step.
Step 1: Contain the Damage
The instinct when you find a hack is to start deleting things. Resist it for a few minutes. The first job is to stop the bleeding and protect the evidence, so that the clean-up actually works.
Call Your Host
Your hosting company has seen this a thousand times. Open a support ticket or chat, explain what you’ve noticed, and ask three questions: have they detected malware on your account, can they share a scan report, and do they have a clean backup from before the problem started. Many hosts include a malware scanner in cPanel or their own panel, and some will even clean the site for you. If you’re still choosing a host, our guide to the best web hosting in India looks at which ones help when things go wrong.
Change Every Password
Assume every password connected to the site is known to someone else. Change, in this order:
- Your hosting account (and the email address linked to it).
- WordPress admin passwords for every user.
- FTP and SFTP accounts.
- The database password, then update it in wp-config.php so the site can still connect.
Use long, unique passwords from a password manager, and switch on two-factor authentication wherever it’s offered.
Back Up the Hacked Site
It sounds strange to back up something broken, but it’s important. A copy of the hacked files and database lets you compare, recover content you’d otherwise lose, and try again if the first clean-up goes wrong. Download it to your computer; don’t overwrite your older backups with it.
Protect Your Visitors
If visitors are being redirected or warned, switch on a maintenance-mode plugin or ask your host to temporarily block public access. A short “We’re doing some maintenance, back soon” page is far better than sending readers to a scam.
Step 2: Find and Remove the Infection
Now the real clean-up begins. There are two routes, and the easier one comes first.
Option A: Restore a Clean Backup
If you have a backup from before the hack, from UpdraftPlus, your host or anywhere else, restoring it is usually the fastest fix. The tricky part is knowing when the hack started. Check when the strange pages or redirects first appeared, look at the dates in your host’s scan report, and pick a backup from comfortably before that.
After restoring, don’t relax just yet. The hole the attacker used, often an outdated plugin, is still there in the restored copy. Update everything immediately and run a scan to confirm it’s clean.
Option B: Clean the Site Yourself
No clean backup? You can still clean it by hand. Work through these in order:
- Scan the site. Install a security plugin such as Wordfence or Sucuri Security and run a full scan. It will flag modified core files, known malware and suspicious code. Your host’s scanner is a useful second opinion.
- Replace WordPress core files. Download a fresh copy of WordPress from wordpress.org and replace the wp-admin and wp-includes folders completely. Don’t touch wp-content or wp-config.php in this step.
- Reinstall plugins and themes. Delete every plugin and theme folder and reinstall fresh copies from official sources. Delete anything you don’t use, and anything “nulled” or downloaded from an unofficial site, which is one of the most common ways sites get infected in the first place.
- Check the uploads folder. The wp-content/uploads folder should hold images and documents, never PHP files. Any .php file in there is almost certainly malicious.
- Inspect wp-config.php and .htaccess. Compare them with a standard version and remove any strange redirect rules or long scrambled code (often starting with eval( or base64_decode).
- Remove rogue admin users. In Users, delete any administrator you don’t recognise, and check your database’s wp_users table too, because some hacks hide users from the dashboard.
- Clean the database. Search your posts and options for injected scripts or spam links. A security plugin’s database scan helps here.
- Scan again. Run the full scan one more time and keep going until it comes back clean.
If your site is showing a critical error rather than spam, a different guide will help: see how to fix the critical error in WordPress.
Step 3: Repair Your Reputation With Google
A clean site isn’t fully recovered until Google agrees it’s clean. This is the step that brings your traffic back.
Clear Any Security Warning
Open Google Search Console and go to Security & Manual Actions → Security issues. If Google has flagged malware, hacked content or deceptive pages, you’ll see the details and sample URLs here. Once you’re sure every problem is fixed, tick I have fixed these issues and click Request review, explaining briefly what you found and what you did. Reviews usually take anywhere from a day to a couple of weeks, and the red browser warning disappears once Google approves.
It’s also worth checking your domain in Google’s Safe Browsing site status tool to see how Google currently views it.
Get Rid of the Spam Pages
Hacks often create thousands of junk pages that Google has already indexed. After the clean-up, those URLs should return a “404 Not Found” or “410 Gone” error. Google drops them naturally over the next few weeks. If some are especially embarrassing, use the Removals tool in Search Console to hide them from results faster while that happens. Don’t block them in robots.txt, because Google then can’t see that they’re gone.
Finally, resubmit your sitemap so Google recrawls your genuine pages quickly.
Step 4: Lock the Doors So It Doesn’t Happen Again
Most WordPress hacks come through the same few weak spots, which is good news, because it means a handful of habits prevent almost all of them:
- Keep everything updated. Outdated plugins are the number one way in. Turn on automatic updates for plugins you trust.
- Use fewer plugins, and only from wordpress.org or reputable developers. Never install nulled premium plugins.
- Protect the login page with strong passwords, two-factor authentication and limited login attempts. Our guide to a secure WordPress login walks you through it.
- Keep automatic off-site backups with UpdraftPlus or your host, stored somewhere other than the server itself.
- Run a security plugin or firewall, and read its weekly report instead of letting it pile up.
- Give people only the access they need. Writers don’t need administrator rights, and old team members shouldn’t have any. Our employee offboarding checklist covers removing access when someone leaves.
When to Call a Professional
Cleaning a simple blog yourself is very doable. But it’s wiser to hand it over if your site takes payments or stores customer data, if the hack keeps coming back after you’ve cleaned it, if Google has flagged the site and you can’t find the cause, or if you simply don’t have the time to work through files carefully. A half-done clean-up often leaves a hidden backdoor, and the hacker walks right back in a week later.
Here’s roughly what help costs, as of November 2026:
| Option | What you get | Approx. cost |
| Your hosting provider | Malware scan, sometimes a free or paid clean-up | Often included; varies by host |
| Local WordPress developer | One-time manual clean-up and hardening | A few thousand rupees, depending on the damage |
| Sucuri Basic Platform | Unlimited malware removal, firewall, monitoring | $229 a year |
| Wordfence Care | Expert-managed security and incident response | $590 a year (reported to rise to $890 from 3 December 2026) |
| Wordfence Response | 24/7 incident response with a 1-hour response time | $1,250 a year (reported to rise to $1,900 from 3 December 2026) |
For most small blogs and business sites, a call to your host plus a trusted local developer is enough. The yearly security services make more sense for online shops or sites that would lose real money during a day of downtime.
Common Mistakes That Make It Worse
- Deleting files at random and breaking the site without removing the actual malware.
- Restoring a backup that’s already infected, because the hack started earlier than you thought.
- Cleaning the files but not changing passwords, which leaves the front door unlocked.
- Forgetting to update the plugin that let them in, so the same hole gets used again.
- Skipping the Google review, and wondering weeks later why traffic hasn’t come back.
- Paying a stranger who messages you offering a “quick fix”. Real security firms don’t cold-message hacked site owners on WhatsApp.
Frequently Asked Questions
How do I know if my WordPress site is hacked?
Common signs are redirects to spammy sites, strange pages in Google when you search site:yourdomain.com, a red “dangerous site” warning in Chrome, unknown admin users, unfamiliar files or plugins, or a warning email from your host or Google Search Console.
Can I fix a hacked WordPress site myself?
Yes, many people do. Restoring a clean backup is the easiest route. Without one, replace WordPress core files, reinstall plugins and themes, remove suspicious files and users, then scan again. If the site handles payments or keeps getting reinfected, get professional help.
Will my Google rankings come back after a hack?
Usually, yes. Once the site is clean, any security warning is removed and the spam pages drop out of the index, most sites recover their rankings over a few weeks. The faster you clean up, the less lasting damage there is.
How long does a Google security review take?
It varies. Some reviews finish within a day, while others take a couple of weeks. Make sure the site is completely clean before you request one, because a failed review can slow things down.
Why does my site keep getting hacked again?
Almost always because a backdoor file was missed, the vulnerable plugin wasn’t updated, or a password wasn’t changed. Repeat the scan, check the uploads folder for PHP files, and change every password again, including hosting and database.
Does a security plugin stop all hacks?
No plugin is perfect, but a good one with a firewall, plus regular updates and strong logins, blocks the vast majority of attacks that hit small WordPress sites.
The Final Word
Finding your WordPress site hacked feels personal, almost like coming home to a broken lock. But it’s one of the most common problems on the web, and it has a clear path out: contain it, clean it, ask Google to take another look, and then close the doors that let the attacker in.
Once you’re through it, the best gift you can give your future self is a few boring habits: updates switched on, backups running quietly in the background, and a login page that’s hard to break. Those habits won’t make headlines, but they’re the reason most well-kept sites never have to read a guide like this one.


