WordPress

WordPress Security Best Practices for 2026: What Actually Matters

WordPress security best practices for 2026: what actually gets sites hacked, the five fixes that stop most attacks, and the popular security steps you can skip.

May 21, 2026 10 min read By TOP CMS

Search “WordPress security best practices” and you’ll find lists of 7, 16, even 25 things to do. They’re not wrong, but they’re paralyzing, and they bury the few things that matter under a pile of things that barely move the needle. We’ve cleaned up a fair number of hacked WordPress sites, and the same handful of causes shows up almost every time. None of them are exotic. So instead of another 25-item list, here’s what actually gets sites hacked, the five fixes that stop most of it, and the popular “security” steps you can safely skip.

What actually gets WordPress sites hacked

WordPress runs roughly 43% of the web, so it’s a big target. But the break-ins we see are almost never clever. They’re boring, and boring is good news, because boring is preventable. In our recovery work, the cause is one of four things nearly every time.

  • An outdated or abandoned plugin or theme. This is the big one. A plugin with a known vulnerability that hasn’t been updated, or one the developer stopped maintaining two years ago, is an open door. The attacker isn’t targeting you; a bot is scanning the whole internet for that exact plugin version.
  • A nulled or pirated plugin. “Free” premium plugins from sketchy sites almost always ship with a backdoor baked in. You didn’t get a deal, you installed the attacker yourself.
  • A weak or reused password. “admin” / “password123” still works more often than it should. So does a password you also used on a site that got breached last year.
  • No second factor on login. Without 2FA, a leaked or guessed password is the whole game. With it, the password alone is useless.

Notice what’s not on that list: sophisticated zero-day exploits, nation-state hackers, someone cracking your encryption. That stuff is real but it’s not why a small business site gets defaced. Fix the boring four and you’ve closed the doors attackers actually use.

The five things that stop most attacks

If you do nothing else, do these five, roughly in this order of impact. They map directly onto the causes above, plus the one that saves you when everything else fails.

1. Update everything, on a schedule

Outdated software is the number one cause of hacked WordPress sites, which makes updating the single highest-value habit you have. Turn on automatic updates for WordPress core and for any plugin you trust to update cleanly. For the few critical plugins where an update could break something, update manually within a week of release, after taking a backup. The goal is simple: no plugin or theme on your site should be more than a version or two behind, ever. And delete what you don’t use. An inactive plugin still has code on your server, and an inactive vulnerable plugin is still a way in. Updates do occasionally backfire and leave a blank page behind; when that happens, our guide to the WordPress white screen of death walks through the recovery.

2. Strong, unique passwords plus two-factor authentication

Use a password manager. 1Password and Bitwarden are both excellent, and they make every login a long random string you never have to remember. Never reuse a password across sites, because one breach elsewhere becomes a break-in here. Then add two-factor authentication to every admin account. A free plugin like Wordfence Login Security or Solid Security lets users confirm logins with Google Authenticator or a similar app. 2FA is the highest-impact 20 minutes you’ll spend on security, because it makes a stolen password useless on its own.

3. Give people the least access they need

This is the one almost every checklist forgets. WordPress has user roles for a reason, yet we constantly find sites where five people are all Administrators because it was easier at the time. Your blog writer needs Author, not Administrator. Your SEO contractor needs Editor at most. The fewer accounts that can install plugins and edit code, the fewer accounts an attacker can use to do real damage. Audit your users today and demote everyone who doesn’t genuinely need the keys to the whole site.

4. Run a reputable security plugin and firewall

A security plugin gives you a firewall to block malicious traffic, malware scanning to catch problems early, and login protection to stop brute-force attempts. Wordfence and Sucuri are the two we reach for, and Solid Security is a solid lighter option. A firewall that limits login attempts kills the most common automated attack on its own, since bots that get three tries instead of three thousand simply give up and move on. Just keep the next section in mind about what a plugin can and can’t do.

5. Keep tested, off-site backups

Every other measure tries to prevent a hack. Backups are what save you when one gets through anyway, and something always eventually gets through. The most upvoted advice in every WordPress security thread is the same: keep a daily off-site backup so that if you’re hacked, you restore and move on instead of paying someone to rebuild. Make sure the backup lives somewhere other than your server, and that you’ve actually tested a restore. We walk through the whole approach in our guide on how to back up WordPress properly. Which backup plugin should run that copy? We rank them by whether the restore actually works in our best WordPress backup plugin comparison.

The security theater you can skip

Here’s where we’ll disagree with half the guides out there. A lot of popular “security” advice is obscurity dressed up as protection. It feels productive and it mostly wastes your afternoon. None of the following stops a determined attacker, and some of it breaks things.

  • Hiding or renaming the login URL. Moving wp-login.php to a “secret” address stops bots from knocking, which cleans up your logs, but it’s not real protection. A bot that gets blocked at login was never your actual risk. If a strong password and 2FA are in place, the bots can knock all day.
  • Hiding the WordPress version number. The idea is that attackers won’t know which exploit to try. In practice they just throw all the exploits at you regardless. Removing the version tag does nothing if the underlying plugin is actually outdated.
  • Renaming the database table prefix on an existing site. Often suggested, rarely worth it, and easy to break a live site doing it. On a brand-new install, fine. Retrofitting it for marginal benefit is not a good trade.

None of this is harmful in itself, beyond the table-prefix risk. The problem is opportunity cost. The hour you spend hiding your login URL is an hour you didn’t spend updating the abandoned plugin that’s the actual hole.

A security plugin is a smoke detector, not a fireproof house

This is worth saying plainly because the marketing implies otherwise. Installing Wordfence does not make an insecure site secure. A security plugin is a smoke detector and a sprinkler: it warns you, it slows an attacker down, and it limits the damage. It does not patch the outdated plugin that let them in, and it can’t fix a password you reused from a breached forum.

We’ve recovered sites that had a premium security plugin running the whole time they were compromised, because the actual vulnerability was an abandoned plugin the firewall wasn’t designed to patch. The plugin matters. It just sits on top of the fundamentals, it doesn’t replace them. Get the five basics right first, then let the plugin do its job.

The baseline: hosting and HTTPS

Two things sit underneath everything else. First, your host. Good managed hosting like Kinsta or WP Engine handles server-level security, isolates your site from neighbors, and patches the stack you can’t see. Cheap shared hosting that crams a thousand sites onto one server means one compromised neighbor can become your problem. Hosting is a security decision, not just a speed one.

Second, HTTPS. Every site needs an SSL certificate so traffic is encrypted, and there’s no excuse to skip it now that Let’s Encrypt makes certificates free and most hosts install them in a click. It protects login credentials in transit, it’s a small ranking signal, and browsers flag sites without it as “not secure,” which scares off visitors. If your site still loads on plain http, fix that today.

What to do if you’re already hacked

If you’re reading this because something already went wrong, don’t panic and don’t start randomly deleting files. The usual signs are spammy redirects, pages you didn’t create, a Google “this site may be harmful” warning, or your host suspending the account. The right order is: take the site offline or into maintenance mode, change every password including hosting and database, scan with Wordfence or Sucuri to find the malicious files, and restore from a clean backup taken before the infection if you have one.

The hard part is making sure it’s actually gone, because attackers leave backdoors so they can return even after you clean the obvious mess. If you’re not certain you found everything, get help rather than hoping. Our WordPress audit and malware recovery service finds the entry point, removes the infection and any backdoors, and closes the hole so it doesn’t happen again. And our WordPress maintenance plans keep updates, backups, and monitoring running so you’re far less likely to need recovery in the first place.

The short version

WordPress security isn’t about doing 25 things. It’s about doing the five that matter and keeping them up. Update everything and remove what you don’t use. Use unique passwords and turn on 2FA. Give people the least access they need. Run a reputable security plugin. Keep tested off-site backups. Do those, host on something decent, and you’ll be safer than the large majority of sites out there, including plenty that spent a weekend hiding their login URL.

Frequently asked questions

What is the most important WordPress security measure?

Keeping WordPress core, plugins, and themes updated. Outdated software is the leading cause of hacked WordPress sites, so consistent updates close more holes than anything else. Turn on automatic updates where you can and delete plugins you no longer use.

Do I need a WordPress security plugin?

It helps, but it isn’t a substitute for the basics. A plugin like Wordfence or Sucuri adds a firewall, malware scanning, and login protection, but it can’t patch an outdated plugin or fix a reused password. Treat it as a layer on top of updates, strong passwords, and 2FA, not a replacement for them.

Is hiding the wp-admin login URL worth it?

Not really. Renaming the login page reduces bot noise in your logs, but it’s obscurity, not protection. If you have a strong password and two-factor authentication, automated login attempts fail anyway. Spend that time updating plugins and setting up 2FA instead.

How do hackers usually get into WordPress sites?

Almost always through an outdated or abandoned plugin or theme with a known vulnerability, a nulled plugin with a backdoor, or a weak or reused password with no 2FA. Bots scan the web for these at scale. They’re rarely targeting you specifically, which is why the standard fixes work so well.

How do I know if my WordPress site has been hacked?

Common signs are unexpected redirects, pages or posts you didn’t create, a sudden traffic drop, a Google warning that the site may be harmful, or your host suspending the account. A scan with Wordfence or Sucuri will usually confirm it and point to the malicious files.

Does WordPress need security if I use managed hosting?

Yes. Good managed hosts like Kinsta and WP Engine secure the server and the stack, which is a real advantage, but they can’t stop you from running a vulnerable plugin or reusing a weak password. Hosting handles the layer below your site; the application-level basics are still on you.

Got a related project?

Send a quick brief — we'll suggest the best path forward.

Contact Form Demo