Almost every WordPress site that gets hacked was hacked through something completely preventable: an outdated plugin, a weak password, or cheap hosting with no isolation. WordPress core itself is rarely the hole. This checklist closes those doors in order of impact, so an hour of work today buys you the protection that matters most.
I've cleaned up enough compromised client sites to know the pattern. The good news: you don't need to be a security expert. You need to do a handful of unglamorous things consistently. Here they are.
Why WordPress gets hacked (and why it's almost always preventable)
WordPress runs a huge share of the web, which makes it a giant, automated target. Bots don't hand-pick your site — they scan millions of sites for a known-vulnerable plugin version or a weak login, then walk in. That's the key insight: most attacks are opportunistic and automated, so you don't have to be unhackable, just harder than the easy targets the bots are farming.
The three doors they come through, in order: out-of-date plugins and themes, weak or reused admin passwords, and shared hosting where one compromised neighbor infects everyone. Shut those three and you've eliminated the overwhelming majority of real-world WordPress hacks.
The non-negotiables (do these today)
If you do nothing else on this page, do these five. They take under an hour combined and stop the most common attacks cold.
- Update WordPress core, every plugin, and every theme right now.
- Turn on two-factor authentication for all admin accounts.
- Set automated daily backups stored off your server.
- Delete any plugin or theme you're not actively using.
- Replace any weak admin password with a long, unique one.
1. Logins and access control
The wp-admin login is the front door, and brute-force bots hammer it around the clock. Make it not worth their time.
- Enforce strong, unique passwords (a password manager makes this painless).
- Enable two-factor authentication (2FA) on every administrator account.
- Limit login attempts so bots get locked out after a few tries.
- Never use "admin" as a username; give each person their own account with the least role they need.
- Add a CAPTCHA or move the login URL if you're getting hammered.
2. Updates: the number-one attack vector
Outdated plugins are responsible for the majority of WordPress compromises. A vulnerability gets disclosed, a patch ships, and bots immediately start scanning for sites still running the old version. Your job is to not be that site.
- Update core, plugins, and themes weekly — set a recurring reminder.
- Enable automatic updates for minor core releases and trusted plugins.
- Remove abandoned plugins (no update in 12+ months) — unmaintained code is a standing risk.
- Only install from the official repository or reputable premium vendors. Never use "nulled" (pirated) plugins — they are the classic malware vector.
3. Hosting and server hardening
Your host is your first line of defense, and it's the layer most people ignore. Cheap shared hosting often means dozens of sites on one server with little isolation — if a neighbor gets infected, you can too.
A good managed host gives you a server-level firewall, account isolation, automatic core patching, malware scanning, and one-click restores. That's a security team you're effectively renting.
For agencies and hands-off site owners who want WordPress-specific hardening built in, managed WordPress hosting is worth the premium.
4. A security plugin: what it does and which I'd pick
A security plugin adds a web application firewall (WAF), malware scanning, and login protection at the application level. It complements your host's protection, not replaces it.
I don't earn anything recommending these — I'm naming them because they're what I actually install:
- Wordfence — the most popular, with a strong firewall and scanner; the free tier is genuinely useful.
- Solid Security (formerly iThemes) — clean, lightweight, great for the login-hardening basics.
- MalCare — the one I reach for when a site needs reliable one-click malware removal.
Pick one. Running two security plugins at once causes conflicts and false positives.
5. Backups: your last line of defense
Every other item reduces the chance of a breach. Backups are what save you when one happens anyway — and eventually, something always slips through. A site without backups is one bad day from gone.
- Automate daily backups (more often for active stores).
- Store them off-server — a hacked server takes its local backups down with it.
- Keep multiple restore points, not just the latest.
- Actually test a restore. A backup you've never restored is a guess, not a safety net.
Not sure where to start? My step-by-step guide to backing up a WordPress site covers the manual and plugin methods, the 3-2-1 rule and how to restore a backup.
6. File and configuration hardening
A few lines in wp-config.php remove the most common footholds attackers use after they get any access at all.
- Disable the built-in file editor so a compromised login can't edit your theme or plugin code.
- Set correct file permissions (typically 644 for files, 755 for directories).
- Move sensitive config out of reach and protect wp-config.php.
7. SSL, firewall, and CDN
These sit in front of your site and stop a lot of traffic before it ever reaches WordPress.
- Run HTTPS everywhere with a valid SSL certificate (free via Let's Encrypt — no excuse not to).
- Put Cloudflare (or your host's WAF) in front of the site for DDoS protection and bot filtering.
- Block XML-RPC if you don't use it — it's a common brute-force amplifier.
Security priorities at a glance
Not every task is equal. If you're short on time, work top to bottom by impact:
| Task | Effort | Impact |
|---|---|---|
| Update core/plugins/themes weekly | Low | Critical |
| Enable 2FA on admin accounts | Low | High |
| Automated off-site daily backups | Low | Critical |
| Managed host with firewall | Medium | High |
| Strong, unique passwords | Low | High |
| Limit login attempts | Low | Medium |
| Harden wp-config.php | Low | Medium |
What to do if you've already been hacked
If you're seeing spam redirects, unknown admin users, or a Google "this site may be hacked" warning, don't panic and don't just delete files blindly.
- Take the site offline (maintenance mode) so you stop serving malware to visitors.
- Restore from a known-clean backup from before the infection if you have one.
- Run a malware scanner (MalCare, Wordfence) to find and remove injected code.
- Change every password — WordPress, hosting, database, FTP — and force-logout all sessions.
- Update everything, then find and close the entry point so it doesn't happen again.
Common security mistakes I still see
- "I'll update later." Later is when the bots find you. Updates are the whole game.
- Treating a security plugin as a substitute for backups and updates. It's a layer, not a cure.
- Using nulled premium plugins to save money — they're the fastest way to invite malware in.
- No backups, or backups stored on the same server that just got compromised.
Frequently asked questions
Next steps
Security isn't a plugin you install once — it's a short routine you keep: update, back up, harden, repeat. Do the non-negotiables today, schedule the rest, and you've put your site ahead of the automated threats that catch everyone else.
A secure site should also be a fast one. Pair this with my companion guide:
Want your site audited and hardened properly? Securing and maintaining WordPress sites is part of what I do for clients:

