WordPress security hardening means closing the gaps attackers actually use, in priority order: keep everything updated, protect logins, give people only the access they need, lock down file permissions, and plan for recovery. This checklist follows the official WordPress hardening guide, starting with the controls that matter most.
Key takeaways:
- Updates come first: the handbook calls keeping everything up to date the most important thing you can do.
- WordPress core has no two-factor login. Add it with a plugin or an identity provider.
- Directories should be 755 and files 644, with wp-config.php readable only by you and the web server.
- Hardening reduces risk; it never removes it. Backups and logs are part of the plan, not an afterthought.
WordPress Hardening Guide: Reduce Risk, Contain Damage
The hardening guide starts with an honest point: security is risk reduction, not risk elimination. Three ideas run through it: limiting access, so fewer entry points exist; containment, so a compromise does not spread; and preparation, so backups let you recover quickly.
Start with the foundation. WordPress.org recommends PHP 8.3 or greater, MariaDB 10.11 or greater or MySQL 8.4 or greater, HTTPS support, and Apache or Nginx. PHP 7.4 and MySQL 5.5.5 have reached end of life and may expose a site to security vulnerabilities. Ask your host whether PHP runs under your own account username, which WordPress.org recommends. On shared hosting, ask what precautions your host takes against a compromised neighbour site.
Get software only from trusted sources: download WordPress only from WordPress.org, and restrict plugins and themes to the WordPress.org repository or well-known companies.
WordPress Auto Updates: The Control That Matters Most
The handbook is direct: the most important thing to do for WordPress security is to keep WordPress itself and all installed plugins and themes up to date, and to choose themes and plugins that are actively receiving updates. When a vulnerability is found and a fix is released, the information needed to exploit it is almost certainly public.
WordPress has featured automatic updates since version 3.7. Use them, turn on automatic updates for plugins and themes you trust, and review the rest promptly. Major plugin releases arrive often; see our coverage of the Elementor 4.4 update for a current example of a release worth acting on quickly.
If you are not using a plugin, delete it rather than leaving it deactivated: a deactivated plugin still sits on the server with code that can contain vulnerabilities. The same applies to unused themes. For more development and maintenance coverage, see our WordPress and Web Development archive.
WordPress Two-Factor Login: Protect the Front Door
The two most common attacks are crafted requests aimed at known vulnerabilities, usually in old plugins, and brute-force password guessing. Strong, unique passwords are the first defence: use a password manager, avoid dictionary words and personal information, and check the strength meter WordPress shows when you change a password. Never use admin as a username; it is the first name attackers try.
Enable WordPress two-factor login for all administrator accounts. WordPress core does not include two-factor authentication, so add it with a reputable plugin or through your identity provider, using an authenticator app, a hardware key, or a passkey. Passkeys offer phishing-resistant login through platform authenticators; enrol at least two per administrator. For API access, use Application Passwords, introduced in WordPress 5.6, which can be revoked without changing your user password.
Slow the bots down before they reach WordPress. Rate-limit login attempts at the edge, through a firewall or content delivery network, so bad traffic is blocked before it reaches your server, and put a CAPTCHA or turnstile challenge on the login page. Protect or disable XML-RPC if you do not need it; if you do, restrict and rate-limit it aggressively. Obscuring the login URL can reduce noise, but it should not be your only defence.
WordPress Least Privilege Roles: Fewer Admins, Less Damage
Limit the number of administrator accounts, and use least-privilege roles for day-to-day work. An editor, author, or contributor account cannot install plugins or change settings, so a compromised account of that kind does far less damage than a compromised administrator. Demote or remove legacy accounts, and audit roles regularly. Renaming the administrative account away from admin and changing the database table prefix away from the default wp_ may help against some automated attacks, but the handbook classes these as obscurity: useful as an extra layer, never as the main defence.
Server Settings That Contain a Breach
Server-level controls decide how far an attacker gets after finding a gap.
WordPress File Permissions: 755 for Directories, 644 for Files
Lock file permissions down as far as possible, loosening them only when write access is needed. Directories should be 755 and files 644, which is also what WordPress sets during an automatic update. The wp-content directory must stay writable by the web server process, since it holds uploads, while wp-admin and wp-includes should be writable only by your account. If you have shell access, the handbook gives these commands, with your own install path in place of the placeholder:
find /path/to/your/wordpress/install/ -type d -exec chmod 755 {} \;
find /path/to/your/wordpress/install/ -type f -exec chmod 644 {} \;
Protect wp-config.php, which holds your database credentials. The handbook says it can be stored one directory level above the installation, outside the web root, and that only you and the web server should be able to read it, generally a 400 or 440 permission. On servers with .htaccess, a short block denying all access to wp-config.php adds another layer. Note the handbook’s caution: moving the file has minimal security benefits in some views and can introduce vulnerabilities if done carelessly, so follow the guidance exactly or leave it where it is.
Disable the built-in file editors: by default, the Dashboard lets administrators edit plugin and theme PHP files, often the first tool an attacker uses after logging in. Add this line to wp-config.php:
define( 'DISALLOW_FILE_EDIT', true );
It removes the file-editing capabilities from all users, closing an easy path to code execution, though it will not stop an attacker uploading malicious files.
Use SFTP rather than plain FTP, so passwords and data are encrypted in transit, and make sure administration happens over HTTPS. Adding server-side password protection to wp-admin adds a second layer, but the handbook warns it can break AJAX functionality such as admin-ajax.php. For database access, normal WordPress operations need only SELECT, INSERT, UPDATE, and DELETE privileges, but the handbook explicitly does not recommend revoking the others, because plugins, themes, and major updates sometimes need to change the database structure.
Backups and Logs: Plan for Recovery
Backups are one control on this list, not a separate project. Back up your data regularly, including your databases, keep snapshots in a trusted location, and rehearse restoring them: an untested backup is a guess, not a plan. Regularly timed snapshots matter because a compromise discovered days later needs a clean copy from before the intrusion.
Logs show the IP addresses, times, and actions involved in an attack, even though they will not name the logged-in user. Watch for changed and added files, especially PHP files. A web application firewall, whether a plugin, a server module such as ModSecurity, or an edge service, filters malicious requests before WordPress processes them.
| Control | Where it is set | What it can break |
|---|---|---|
| Auto updates | Dashboard and plugin settings | A new release can conflict with a theme or plugin; test major releases |
| Delete unused plugins and themes | Dashboard | Nothing if truly unused; check for shortcodes or widgets first |
| Two-factor login | Security plugin or identity provider | Logins if the second factor is lost; keep recovery codes safe |
| Strong unique passwords | Password manager | Nothing; password resets are quick |
| Least-privilege roles | User accounts | Editors lose settings access they should not have; that is the point |
| File permissions 755 and 644 | Server shell or hosting panel | Uploads and updates if set too tight; wp-content must stay writable |
| DISALLOW_FILE_EDIT | wp-config.php | Built-in theme and plugin editors stop working; use SFTP instead |
| wp-config.php protection | .htaccess or file location | Nothing when done as the handbook describes |
| Login rate limiting and firewall | Edge, CDN, or security plugin | Legitimate logins if limits are too strict; allowlist office IPs |
| Tested backups | Hosting panel or backup plugin | Nothing; an untested backup is the real risk |
WordPress security hardening is ongoing work, not a one-time task. Work the list in order, test changes before they reach production, and revisit the controls whenever you add a plugin, a user, or a new feature. WebReOn Agency publishes this blog; read more about the team on our About Us page.
Frequently Asked Questions
What is WordPress hardening?
Hardening means applying the controls that reduce risk and contain damage: updates, strong logins, least-privilege roles, locked-down file permissions, and tested backups. It reduces risk; it never removes it.
Should unused plugins be deleted or deactivated?
Deleted. A deactivated plugin still has code on the server that can contain vulnerabilities.
Does WordPress core include two-factor login?
No. WordPress core does not include it. Add it with a reputable plugin or through your identity provider, and enable it for all administrators.
What file permissions should WordPress use?
Directories 755 and files 644, with wp-config.php readable only by you and the web server, generally 400 or 440. wp-content must stay writable for uploads.
How often should WordPress backups be tested?
Regularly, and after any major change. Rehearse a restore before you need one, not during an incident.



11 Comments
How to Choose WordPress Hosting Without Costly Mistakes
November 17, 2026[…] […]
Moving to a CDN: Google Guidance on Origin Load Spikes
November 17, 2026[…] […]
European Accessibility Act: Website Rules Explained
November 17, 2026[…] The checklist below turns the standard into work, most barriers first. It is a practical programme, not a legal guarantee. Site maintenance is covered in our WordPress security hardening checklist. […]
Google Finds AI Agents Turning Patches Into Exploits
November 17, 2026[…] WordPress security hardening checklist covers updates, logins, roles, and file permissions in priority order. Browse the latest articles […]
FBI Warns Gootloader Uses SEO Poisoning on WordPress
November 17, 2026[…] any check surfaces something unfamiliar, our WordPress security hardening checklist works through the same ground in priority order. More security reporting is in the Cybersecurity […]
How to Choose a WordPress Theme That Fits Your Site
November 17, 2026[…] scripts will slow every page. Judge the demo by how quickly it loads, not by how much it moves. Our WordPress security hardening checklist covers keeping WordPress, themes and plugins updated once the theme is […]
How to Migrate a WordPress Site to a New Host Safely
November 17, 2026[…] the site runs well on its new host, lock it down with our WordPress security hardening checklist, covering updates, logins, roles and file permissions. If the move also changed the look of the […]
WordPress 7.1.5 Security Update Fixes 20 Flaws Now
November 17, 2026[…] escalate it to your site administrator or a security professional. For the longer-term work, our WordPress security hardening checklist covers updates, logins, roles and file permissions in priority […]
Defend Against AI Agent Cyberattacks: A Business Guide
November 17, 2026[…] Patches Into Exploits Alone. If your business runs a WordPress site, the same discipline applies: WordPress Security Hardening Checklist: Close the Doors Attackers Use. More coverage is in the Cybersecurity […]
NFS2ROOT CVE-2026-99362: Check and Patch Your Linux Server
November 17, 2026[…] the same discipline applies: close what the internet can see, patch fast, check your logs. Our WordPress Security Hardening Checklist applies the same order of work to a WordPress install. For how attackers reach servers through […]
How to Set Up Passkeys on Google, Apple and Microsoft
November 17, 2026[…] your recovery email and phone number current and do not create passkeys on a shared device. Our WordPress security hardening checklist applies the same principle to a website: the strongest lock on the front door is worth little if […]