WordPress runs about 40% of all websites, according to W3Techs (October 2026). That makes it the biggest target on the web. Not because it is insecure by default, but because attackers optimize for scale: an exploit that works on one WordPress plugin can be tried against every site that runs it.

Most successful attacks still go through a small set of well-known weaknesses. This checklist works through them in order of impact, with the configuration and code to fix each one. It assumes you have admin access and either server access or your host’s control panel. For the platform-neutral basics, including the accounts around your site (hosting, registrar, DNS, email), start with our website security checklist.

1. Update everything

Patchstack’s State of WordPress Security in 2026 report counted 11,334 new WordPress vulnerabilities disclosed in 2025: 91% in plugins, 9% in themes and six in core. It also found that roughly half of high-impact vulnerabilities were exploited within 24 hours, and the most heavily targeted within a weighted median of five hours. A weekly update routine is too slow for security fixes.

WordPress core

Automatic minor (maintenance and security) updates have been on by default since WordPress 3.7. Leave them on. If they have been disabled, restore them in wp-config.php:

define( 'WP_AUTO_UPDATE_CORE', 'minor' );

For major releases, test on staging first, then apply promptly.

Plugins

Plugins are where most vulnerabilities are found, so they need the most discipline:

  • Apply security updates the day they ship. Turn on automatic updates for plugins whose updates you trust, and check the rest daily or use a service that alerts you to vulnerabilities in the plugins you run.
  • Audit quarterly. Delete any plugin you are not using. A deactivated plugin is still exploitable if its files are on the server.
  • Check before installing. Look at the last update date, the “tested up to” version, and how the developer responds in the support forum. Be wary of anything not updated in the last year.
  • Keep the count down. Every plugin is a potential entry point and code you have to keep patching.

Themes

The same rules apply. Delete unused themes, keeping only your active theme (and its parent) plus one default theme as a fallback.

PHP

Run a PHP version that still receives security fixes. As of October 2026, php.net lists 8.2, 8.3, 8.4 and 8.5 as supported, and 8.2’s security support ends on December 31, 2026. If you are on 8.2 or older, plan the move to 8.3 or later now, and test your plugins and theme against it on staging first. PHP 7.4 reached end of life in November 2022; anything older than 8.2 no longer gets security fixes at all.

2. Authentication hardening

Automated login attempts against wp-login.php are routine for any public WordPress site. The question is whether your authentication holds.

Strong passwords, enforced

WordPress suggests strong passwords but does not require them. Make it policy:

  • Require long passwords for every account that can edit content, and especially for administrators.
  • Use a password manager. If your team does not use one, fix that before installing any security plugin.
  • No password reuse. Credential stuffing, where passwords leaked from other services are tried against your login, is one of the most common ways accounts are taken over.

Two-factor authentication

Require it for every administrator and editor account.

  • WP 2FA supports authenticator apps and email codes, with policies to enforce 2FA by role.
  • Two Factor, a lightweight plugin maintained by WordPress contributors, supports authenticator apps, email codes and backup codes.

Authenticator apps (including those built into password managers) are strongly preferred over SMS codes, which SIM-swap attacks can intercept.

Login attempt limiting

Lock out an IP address for a period after a handful of failed attempts, with longer lockouts for repeat offenders. Botnets rotate IP addresses, so treat this as a brake on automated guessing, not a wall; two-factor authentication is the wall.

Options:

  • Limit Login Attempts Reloaded: simple, focused, low overhead.
  • Wordfence: includes login limiting in a broader security suite.
  • Server-level rate limiting in Nginx or Apache, preferred if you control the server.

Moving the login URL

This is security through obscurity. It will not stop a determined attacker, but it cuts most of the automated traffic hitting your login page, which means quieter logs and less server load. WPS Hide Login does it without complex configuration.

3. File permissions and wp-config hardening

File permissions

The correct permission structure for WordPress:

Path Permission Why
Directories 755 Owner can read/write/execute; group and others can read/execute
Files 644 Owner can read/write; group and others can read only
wp-config.php 400 or 440 Owner can read only; no one else has access
.htaccess 644 Readable by Apache, writable by owner only

If anything on the server is set to 777 (full access for everyone), that is a critical vulnerability. Fix it immediately.

wp-config.php hardening

This file holds your database credentials and authentication keys. Harden it:

Move it above the web root. If WordPress does not find wp-config.php in its own directory, it looks one directory up, which keeps the file out of reach of any URL.

Set unique authentication keys and salts. Generate fresh ones at api.wordpress.org/secret-key/1.1/salt/ and paste them into the config. Rotate them after any suspected compromise; doing so logs every user out at once.

Disable file editing:

define( 'DISALLOW_FILE_EDIT', true );

This removes the theme and plugin file editors from the admin. If an attacker takes over an admin account, they cannot inject code through the built-in editors.

Force HTTPS for the admin:

define( 'FORCE_SSL_ADMIN', true );

Disable XML-RPC unless something you use depends on it; some older mobile apps and integrations, including parts of Jetpack, do. XML-RPC is a legacy API that lets an attacker try many passwords in a single request. Block it at the server level (Apache 2.4 syntax):

# .htaccess
<Files xmlrpc.php>
  Require all denied
</Files>

Or in Nginx:

location = /xmlrpc.php {
  deny all;
  access_log off;
  log_not_found off;
}

4. Web application firewall (WAF)

A WAF inspects incoming requests and blocks known attack patterns, such as SQL injection, cross-site scripting and file inclusion, before they reach WordPress. It is a useful layer, not a substitute for updates. Patchstack’s report found that traditional hosting-level defenses blocked only 12% of attacks on WordPress-specific vulnerabilities in its tests, which is why WordPress-aware rules matter.

Edge firewalls

These sit between visitors and your server and filter traffic before it arrives:

  • Cloudflare: the free plan includes basic managed rules; paid plans add more.
  • Sucuri Firewall: a paid firewall and CDN with DDoS protection, sold alongside Sucuri’s malware cleanup plans.

Application-level firewalls

These run as WordPress plugins and see requests with WordPress context:

  • Wordfence: a broad security plugin with a firewall, malware scanner and login protection. Its premium tier gets new firewall rules sooner.
  • NinjaFirewall: a lighter firewall that can run before WordPress loads.

Layering

The strongest setup uses both: an edge firewall to absorb bulk attack traffic, and an application-level firewall or virtual-patching service with WordPress-specific rules for what gets through. Neither replaces applying the fix.

5. Database and backups

The database prefix

WordPress defaults to wp_ as the table prefix. Changing it is obscurity: it may stop the crudest automated scripts, but any SQL injection that can read the database can also find the real table names. Set a custom prefix on new installs:

$table_prefix = 'xk7m_';

On an existing site, renaming every table and the options that reference the prefix is rarely worth the risk.

Backups

Backups are your last line of defense. A clean, recent backup turns a compromise into a restore instead of a rebuild.

  • Daily automated backups of files and database.
  • Off-site storage, never only on the same server as the site.
  • At least 30 days of retention, so you can go back to before a compromise you discovered late.
  • Tested restores, at least quarterly.

Tools:

  • UpdraftPlus: the free version handles scheduled backups to Google Drive, Dropbox or S3.
  • BlogVault: a paid service with real-time backups, staging and one-click restore.
  • Server-level snapshots: if your host offers automated snapshots, enable them as a second layer.

6. Server-level hardening

These settings live outside WordPress, at the server or hosting level.

Disable directory browsing

Stop visitors from listing the contents of directories:

# .htaccess
Options -Indexes

Block PHP execution in uploads

Attackers often upload PHP files disguised as images. Nothing in /wp-content/uploads/ should ever execute. On Apache 2.4:

# wp-content/uploads/.htaccess
<FilesMatch "\.(php|phtml|phar)$">
  Require all denied
</FilesMatch>

On Nginx:

location ~* ^/wp-content/uploads/.*\.(php|phtml|phar)$ {
  deny all;
}

Security headers

Add these to your server or CDN configuration:

Strict-Transport-Security: max-age=31536000; includeSubDomains
Content-Security-Policy: [written for your site]
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: camera=(), microphone=(), geolocation=()

Use SAMEORIGIN rather than DENY: the Customizer previews the site in a same-origin frame, and DENY breaks it. Add preload to the HSTS header only once you are sure every subdomain will serve HTTPS permanently, because removal from browsers’ preload lists is slow. A Content Security Policy for WordPress usually needs tuning per site, since plugins add their own scripts; start in report-only mode.

7. Monitoring

Security without monitoring is hope. You need to know when files change, when login patterns shift and when a new admin account appears.

File integrity monitoring

Wordfence compares core, plugin and theme files against known-good versions and alerts you to unexpected changes.

Activity logging

WP Activity Log (or similar) records who logged in, what they changed and when. It is essential on multi-user sites and invaluable during an investigation.

Uptime monitoring

Use an external service such as UptimeRobot or Better Stack to check the site every minute or two. If it goes down, you should know before your customers do.

Vulnerability alerts

Subscribe to alerts for the plugins and themes you actually run, from your security plugin or a vulnerability database, so you hear about a flaw the day it is published.

Incident response: after a breach

Even good hardening can fail. If it does, work through these steps in order.

Immediately

  1. Act quickly and calmly. Every hour an attacker keeps access, the damage can grow.
  2. Take the site offline. A maintenance page stops ongoing harm to visitors while you work.
  3. Preserve the evidence. Copy access and error logs before cleaning anything.
  4. Change every password (WordPress admins, database, FTP or SFTP, hosting panel, CDN) from a device you trust.
  5. Revoke all sessions. Rotating the keys and salts in wp-config.php logs every user out at once.

Investigate

  1. Check the access logs for the entry point. Look for POST requests to unusual paths, especially under /wp-content/uploads/.
  2. Scan for malware with Wordfence, Sucuri SiteCheck or MalCare.
  3. Review file modification dates. Anything changed during the attack window is suspect.
  4. Look for backdoors. Attackers often leave a way back in. Common places are wp-content/uploads/, wp-includes/, theme functions.php files and unfamiliar admin accounts.

Recover

  1. Restore from a clean backup taken before the compromise.
  2. If there is no clean backup, remove the infected files, then reinstall WordPress core, plugins and themes from fresh copies.
  3. Update everything: core, plugins, themes and PHP.
  4. Reapply this checklist from the top.
  5. Request a review in Google Search Console if Google flagged the site.

Afterward

  1. Write down what happened: entry point, timeline, impact and response.
  2. Fix the root cause. If an outdated plugin was the way in, change how updates are applied, not just that plugin.
  3. Check your obligations. If personal data may have been exposed, you may have legal duties to notify people. Talk to a lawyer.
  4. Monitor closely for at least 30 days.

If you only do three things

  1. Apply security updates the day they ship, for core, plugins and themes.
  2. Turn on two-factor authentication for every administrator and editor.
  3. Keep tested, off-site backups, so a compromise is a restore, not a rebuild.

These three prevent or contain most WordPress compromises. A firewall and the rest of this checklist add depth, but none of it works without the first three. Our WordPress modernization work covers hardening and ongoing care.