Originally published: April 1, 2025 · Last reviewed and updated: October 2026
WordPress core is rarely the weak point of a hacked WordPress site. The usual causes are outdated plugins, weak or reused passwords, and admin accounts nobody remembers creating. That makes WordPress security mostly a matter of routine: fewer, updated components, strong logins, and backups you can restore.
This guide lists the practices that matter most in 2026, in priority order, with a checklist you can work through in an afternoon.
The Short Answer
Keep WordPress core, plugins, and themes updated, and delete anything you do not use. Protect every admin account with a unique strong password and two-factor authentication. Give each user the lowest role they need. Run the site on HTTPS with a supported PHP version, add a web application firewall (from your host, a CDN, or a plugin), and keep automatic off-site backups that you have actually tested.
Speed matters more than it used to. Patchstack’s State of WordPress Security in 2026 report found that the weighted median time from disclosure to first exploitation of heavily exploited vulnerabilities was about five hours. Waiting a week to update is no longer a safe habit.
Where WordPress Vulnerabilities Come From
According to the same Patchstack report, 11,334 new vulnerabilities were found in the WordPress ecosystem in 2025, 42% more than in 2024. Of those, 91% were in plugins and 9% in themes, while WordPress core had only six, all low priority. The report also says 46% of vulnerabilities were not fixed by the time they were publicly disclosed.
Two practical conclusions follow. First, every plugin you install adds risk, so the number of plugins matters as much as their quality. Second, updates alone are not enough: you also need a way to block attacks on vulnerabilities that do not have a patch yet, which is what a firewall or virtual patching service does.
Priority Checklist
Work through this table from top to bottom. The first five items prevent most of the compromises site owners deal with.
| Priority | Practice | How to do it |
|---|---|---|
| 1 | Update core, plugins, and themes | Enable auto-updates for plugins and themes (available since WordPress 5.5) for trusted, well-maintained components |
| 2 | Remove unused plugins and themes | Delete, do not just deactivate; inactive code can still be exploited |
| 3 | Strong, unique passwords + 2FA | Use a password manager; add two-factor authentication with a plugin or your host’s login protection |
| 4 | Least-privilege user roles | Only owners need Administrator; writers get Author or Editor |
| 5 | Tested off-site backups | Daily automatic backups stored away from the server; restore one to staging every few months |
| 6 | Web application firewall | Host or CDN firewall, or a security plugin with firewall rules |
| 7 | HTTPS and supported PHP | Valid certificate with auto-renewal; PHP version that still receives security fixes |
| 8 | Hardening in wp-config.php | Disable the built-in file editor; protect wp-config.php with correct file permissions |
| 9 | Activity logging and alerts | Log logins, role changes, and plugin installs so you notice problems early |
Keep Software Updated, and Install Less of It
WordPress applies minor core security releases automatically by default. Plugin and theme auto-updates are off by default, so turn them on for components from established developers. For a store or a heavily customized site, update on a staging copy first and then apply the same updates to production promptly.
Before installing a plugin, check when it was last updated, how many active installations it has, and whether the developer responds to support threads. If a plugin has been closed in the WordPress.org directory, replace it.
Lock Down Logins and User Accounts
Stolen and guessed passwords remain one of the simplest ways into a WordPress site. WordPress 6.8 switched password storage to bcrypt hashing, which makes stolen password hashes much harder to crack, but it cannot protect a reused password that has already leaked elsewhere.
- Require two-factor authentication for every Administrator and Editor.
- Limit login attempts, or use your host’s or CDN’s bot protection on
wp-login.php. - Review users every quarter and remove accounts for former staff, agencies, and test users. Our guide to the User Role Editor plugin explains how to fine-tune role capabilities.
- Revoke unused application passwords in each user’s profile.
Changing the login URL can reduce automated noise in your logs, but it does not replace 2FA. If you want to do it anyway, see our guide to a custom login URL.
Harden the Server and wp-config.php
The official Hardening WordPress guide recommends several low-effort changes. The most useful for most sites is disabling the dashboard file editor:
define( 'DISALLOW_FILE_EDIT', true );
This removes the theme and plugin editors from wp-admin. According to the same documentation, it will not stop an attacker from uploading files, but it closes an easy path for anyone who gets into an admin account.
Also check that your site runs on HTTPS (see our guide to adding SSL to WordPress), that wp-config.php is not world-readable, and that your hosting account uses its own strong password and 2FA. If you do not use XML-RPC (for example, for the mobile app or Jetpack), blocking it at the firewall removes another common brute-force target.
Add a Firewall and Monitoring
A web application firewall filters malicious requests before they reach WordPress. You can get one from your host, from a CDN such as Cloudflare, or from a security plugin. Because almost half of vulnerabilities are disclosed before a fix exists, a firewall with virtual patching rules covers the gap between disclosure and update.
Pair it with monitoring: uptime checks, file-change or malware scanning, and an activity log. The goal is to learn about a problem from your own alerts, not from a visitor or a Google warning.
Have a Recovery Plan
Even well-maintained sites get compromised. Decide in advance what you will do:
- Put the site in maintenance mode or take it offline.
- Change all passwords: WordPress users, hosting, database, FTP/SFTP, and email.
- Restore a clean backup from before the compromise, or clean the files with a malware scanner.
- Update everything, remove the vulnerable component, and regenerate the security keys in
wp-config.php. - Check the Security Issues report in Google Search Console and request a review if needed.
A recovery plan is only as good as your backups. Our guide on how to back up a WordPress site covers schedules, storage, and restore tests.
Common Mistakes
- Deactivating instead of deleting unused plugins and themes.
- Sharing one Administrator login among several people or agencies.
- Installing nulled premium plugins, which often contain backdoors.
- Stacking several security plugins that conflict and slow the site down.
- Keeping backups only on the same server, where an attacker or a server failure can delete them.
FAQ
Is WordPress secure enough for business sites?
Yes, when it is maintained. Patchstack counted only six low-priority core vulnerabilities in 2025; most risk comes from plugins, themes, and account security, which you control.
Do I need a security plugin?
Not always. If your host or CDN already provides a firewall, malware scanning, and login protection, a full security plugin may duplicate them. You still need 2FA, updates, and backups, which some sites handle with smaller, single-purpose plugins.
Should I enable automatic plugin updates?
For well-maintained plugins on most sites, yes. The risk of a broken update is usually smaller than the risk of an unpatched vulnerability being exploited within hours. For complex stores, use staging and update quickly.
How do I know if my site has been hacked?
Common signs include unknown admin users, spam pages in Google results, unexpected redirects, browser or Search Console security warnings, and files you did not add. Our list of fixes for common WordPress issues covers some of the symptoms.
Does hiding the WordPress version improve security?
Only slightly. Attackers usually scan for vulnerable plugins directly, so updating matters far more than hiding version numbers.
The Bottom Line
WordPress security in 2026 comes down to a short routine done consistently: update quickly, install fewer plugins, protect logins with 2FA and least-privilege roles, harden the basics, put a firewall in front of the site, and keep tested off-site backups. Most hacked sites skipped one of those steps, not some advanced technique.
Sources & Further Reading
- Patchstack: State of WordPress Security in 2026
- WordPress Advanced Administration: Hardening WordPress
- WordPress Documentation: Plugins and themes auto-updates
- Make WordPress Core: WordPress 6.8 will use bcrypt for password hashing
- WordPress.org: Security
- Google Search Console Help: Security Issues report
- Make WordPress Hosting: Security handbook
Articles are editorially reviewed by Jackober and factual claims are checked against cited sources.





1 comment