# WordPress security checklist: 14 steps, in the order that matters

> A practical WordPress security checklist: updates, logins, two-factor, a firewall, file scanning, backups and headers, in the order that stops the most attacks first.

Guide 5 min read · Updated 24 November 2026


Most hacked WordPress sites aren’t hit by anything clever. They run a plugin with a known hole, or a login that a bot guessed. Fix those two first, then work down the list.

Security advice for WordPress often comes as a long, flat list where hiding the version number sits next to two-factor login as if they were equal. They aren’t. This checklist is ordered by what actually stops attacks, so if you only get through the first five steps today, you have done most of the work.

## 1. Know when something you run has a known hole

Every week, security researchers publish new vulnerabilities in WordPress plugins and themes. Once a hole is public, bots start probing for it within days. The fix almost always already exists: a newer version of the plugin. The danger is the gap between “a fix is out” and “you installed it”.

Two habits close that gap:

- **Update promptly.** Turn on automatic updates for plugins you trust and that rarely break, and check the rest at least weekly.
- **Get told about vulnerabilities, not just updates.** An update notice doesn’t say whether it is urgent. A vulnerability alert does: “this version of this plugin has a known security hole, fixed in 4.2.1”. The free WPScan database covers WordPress core, plugins and themes, and [Vulnerability Alerts](https://togglework.app/features/security/vulnerability-alerts/) checks your site against it daily.

[![Vulnerability Alerts settings screen in the Toggleworks WordPress plugin, showing WPScan API token, Lookups per day, Alert me about new vulnerabilities](https://togglework.app/wp-content/themes/toggleworks-site/assets/img/parts/security-vulnerability-alerts.webp?v=1795524359)](https://togglework.app/features/security/vulnerability-alerts/)

Vulnerability Alerts: checks what you run against the WPScan database every day.

Also delete plugins and themes you have deactivated and don’t plan to use. Deactivated code can still be reached directly on the server.

## 2. Stop password guessing

Bots try common passwords against wp-login.php and XML-RPC all day, on every WordPress site on the internet. WordPress doesn’t limit how many times they can try. Fix that:

- **Limit failed logins per IP address.** Five failures in fifteen minutes, then a lockout of half an hour, is a sensible start. Doubling the lockout for repeat offenders makes persistent bots give up. [Login Lockdown](https://togglework.app/features/security/login-lockdown/) does this, including logins over XML-RPC, which many tools forget.
- **Be careful with username lockouts.** Locking a username after too many failures from any IP sounds stronger, but it lets an attacker keep a real person locked out. Use it only if you need it, and always allowlist your own IP.
- **Show generic login errors.** “Incorrect username or password” instead of “unknown username” stops bots learning which accounts exist.

## 3. Turn on two-factor for everyone who can change the site

Passwords leak: through reuse on other sites, phishing or a compromised laptop. Two-factor authentication means a leaked password alone isn’t enough. Require it at least for administrators, editors and shop managers.

Practical points that decide whether people actually use it:

- Give people a **grace period** (a week is fine) to set it up, rather than locking them out on day one.
- Offer an **authenticator app** as the main method and **email codes** as a fallback.
- Hand out **backup codes** and let people **trust a device** for 30 days so they aren’t asked every time.

[Two-Factor Authentication](https://togglework.app/features/security/two-factor/) covers all of that. Better still, offer **passkeys** : sign-in with Face ID, Touch ID, Windows Hello or a security key. There is no password to steal, and a passkey can’t be phished because it only works on your real domain. [Passkeys](https://togglework.app/features/security/passkeys/) adds a “Sign in with a passkey” button to the login page.

[![Two-Factor Authentication settings screen in the Toggleworks WordPress plugin, showing Require two-factor for these roles, Allowed methods, Trust a device for (days), Grace period for required roles (days)](https://togglework.app/wp-content/themes/toggleworks-site/assets/img/parts/security-two-factor.webp?v=1795524241)](https://togglework.app/features/security/two-factor/)

Two-Factor: choose the roles that must use it, the methods, and a grace period.

## 4. Keep backups somewhere other than the server

Backups are a security measure. When something does go wrong, a clean copy from before the problem turns a disaster into an hour of work. The rule that matters: **at least one copy must live off the server** , because a hacked or failed server takes its local backups with it. Our [backup guide](https://togglework.app/guides/wordpress-backups/) covers schedules and storage in detail.

## 5. Put a firewall in front of WordPress

A web application firewall looks at each request before WordPress handles it and drops the obviously malicious ones: SQL injection attempts, script injection, path traversal (`../../wp-config.php`), and scanners such as sqlmap and nikto that announce themselves.

A good firewall also lets you:

- Block specific IP addresses and ranges.
- Rate-limit clients that request dozens of pages a second.
- Block countries you never do business with, either site-wide or just for the login and admin area. This needs your server or CDN to report the visitor’s country (Cloudflare does).

[Firewall](https://togglework.app/features/security/firewall/) does these inside WordPress. If you also use Cloudflare or a host firewall, that’s fine: layers help.

[![Firewall settings screen in the Toggleworks WordPress plugin, showing Block attack patterns, Block bad bots and scanners, Block countries, Country block applies to](https://togglework.app/wp-content/themes/toggleworks-site/assets/img/parts/security-firewall.webp?v=1795524230)](https://togglework.app/features/security/firewall/)

Firewall: attack patterns and bad bots are blocked out of the box; recent blocks are listed below the settings.

## 6. Switch off what you don’t use

Every feature that is on is something to attack. A few WordPress defaults are rarely needed:

- **XML-RPC.** Used by Jetpack and some old mobile apps; otherwise mostly used by bots for password guessing and pingback abuse. Turn off at least pingbacks, or all of it if nothing needs it.
- **The theme and plugin file editor** in wp-admin. If an attacker gets an admin login, this is how they add a backdoor. The `DISALLOW_FILE_EDIT` constant, or [Hardening](https://togglework.app/features/security/hardening/), removes it.
- **Username discovery.** `/?author=1` and the REST users endpoint reveal login names to anyone. Block them for logged-out visitors.
- **Application passwords** , if you don’t connect any apps over the REST API.

## 7. Scan files for changes and malware

WordPress.org publishes checksums for every core release and for plugins in its directory. Comparing your files against them is the most reliable way to spot a modified file. Two more checks catch most infections: PHP files inside `wp-content/uploads` (there should be none) and code patterns that are typical of malware. [Malware & File Scanner](https://togglework.app/features/security/malware-scanner/) runs all three weekly and emails you if it finds something.

## 8. Send security headers

HTTP security headers tell browsers how to treat your pages. They are cheap to add and protect visitors:

- `X-Content-Type-Options: nosniff` and `X-Frame-Options: SAMEORIGIN` (stops other sites framing yours for clickjacking).
- `Referrer-Policy: strict-origin-when-cross-origin`.
- `Strict-Transport-Security` (HSTS), once HTTPS works everywhere. Test with a short max-age first: browsers remember it.
- A `Content-Security-Policy` is the strongest and the easiest to get wrong. Start in report-only mode and watch the browser console.

[Security Headers](https://togglework.app/features/security/security-headers/) sets these with safe defaults.

## 9. Keep a record of who changed what

An activity log answers the first questions after an incident: who logged in, from where, which plugin was installed, which user became an administrator. It also catches honest mistakes. Keep 90 days. [Activity Log](https://togglework.app/features/security/activity-log/) records logins, user and role changes, plugin and theme changes, core updates and content changes.

## 10–14. The smaller wins

1. **Give people the lowest role that works.** Writers don’t need to be administrators.
2. **Use a unique, long password** for every admin account, stored in a password manager.
3. **Hide the WordPress version** from page source. It won’t stop a determined attacker, but there is no reason to advertise it.
4. **Move the login page** to a custom address to cut bot noise. Bookmark it first. See [Custom Login URL](https://togglework.app/features/security/login-url/).
5. **Protect staging sites** with a password and keep them out of search engines. Forgotten staging copies are a common way in.

## If you get locked out

Every lockout, two-factor and login-address feature can, in rare cases, lock out the owner too. Before you switch them on, make sure you know your way back in: a backup code, a second admin account, or file access to the server. With Toggleworks, adding `define( 'TOGGLEWORKS_SAFE_MODE', true );` to wp-config.php pauses every part until you remove the line.

Written by the Toggleworks team, who build and support a WordPress plugin used for exactly these jobs. We keep this guide plugin-neutral: every step works with any tool, or none.

## Doing this with Toggleworks

Every step above that needs a plugin is a part of Toggleworks. Each one is off until you switch it on, and all of them come in every plan.

- [Vulnerability Alerts](https://togglework.app/features/security/vulnerability-alerts/) — TW-SEC-18 · Checks WordPress, your plugins and themes against the WPScan vulnerability database every day, and alerts you the moment… · 3 settings
- [Login Lockdown](https://togglework.app/features/security/login-lockdown/) — TW-SEC-09 · Block an IP address (and optionally a username) for a while after too many failed logins, including XML-RPC. Locked out yourself?… · 8 settings
- [Two-Factor Authentication](https://togglework.app/features/security/two-factor/) — TW-SEC-17 · Require a code from an authenticator app or email after the password, with backup codes and trusted devices. Lost your device?… · 4 settings
- [Passkeys](https://togglework.app/features/security/passkeys/) — TW-SEC-13 · Let people sign in with Face ID, Touch ID, Windows Hello or a security key — no password to steal or phish. Each person adds… · 3 settings
- [Firewall](https://togglework.app/features/security/firewall/) — TW-SEC-06 · Block common attacks (SQL injection, script injection, path traversal), bad bots and scrapers, chosen countries and IPs, and slow… · 7 settings
- [Hardening](https://togglework.app/features/security/hardening/) — TW-SEC-07 · Switch off XML-RPC and the file editor, hide the WordPress version, stop username discovery, and limit the REST API for visitors. · 10 settings
- [Malware & File Scanner](https://togglework.app/features/security/malware-scanner/) — TW-SEC-12 · Check WordPress core and plugin files against official checksums, find PHP files hidden in uploads, and search code for known… · 2 settings
- [Security Headers](https://togglework.app/features/security/security-headers/) — TW-SEC-14 · Send HTTP security headers such as X-Frame-Options, Referrer-Policy, Permissions-Policy, HSTS and Content-Security-Policy. · 11 settings
- [Activity Log](https://togglework.app/features/security/activity-log/) — TW-SEC-01 · Keep a record of logins, user and role changes, plugin and theme changes, core updates, content changes and key settings. · 2 settings
- [Database Backups](https://togglework.app/features/core/backups/) — TW-COR-02 · Back up the database on demand or on a schedule, download copies, and restore one in a click — handy before updates or big… · 3 settings

## Questions

**Is WordPress itself insecure?**

No. WordPress core is well maintained and security fixes ship quickly, often as automatic minor updates. Year after year, security firms that track WordPress vulnerabilities report that the large majority are found in plugins and themes, not in core. That is why keeping plugins updated, and knowing when one has a known hole, matters most.

**Does hiding the login page make a site secure?**

On its own, no. A custom login address cuts the noise from bots that only try wp-login.php, which keeps logs readable and reduces load. It does nothing against a stolen password or a vulnerable plugin. Treat it as a tidy extra after strong passwords, two-factor and lockouts.

**Do I need a security plugin if my host has a firewall?**

A host or CDN firewall (Cloudflare, for example) stops a lot before it reaches WordPress, and is worth having. It can’t see WordPress-specific things such as who logged in, which plugin has a known vulnerability, or whether a core file changed. Those checks have to run inside WordPress.

**How do I know if my site has already been hacked?**

Common signs: spam pages in Google results for your domain (search site:yourdomain.com), redirects that only happen on phones or from search results, admin users you didn’t create, and PHP files in the uploads folder. A file scan that compares core and plugin files against their official checksums catches most of these.

## More guides

- How to speed up a WordPress site, in the right order5 min read
- The technical WordPress SEO checklist4 min read
- WordPress not sending email? Here’s the fix4 min read
- How to back up a WordPress site properly3 min read

## Switch off the plugin pile.

All 188 parts, one license, updates and support. 14-day refund.

[Choose a plan](https://togglework.app/pricing/#plans) [Try the live demo](https://togglework.app/demo/)

---

Source: https://togglework.app/guides/wordpress-security-checklist/
