Short answer
Apply the same baseline to every site: two-factor authentication and least-privilege accounts, scheduled updates, strict file permissions and no dashboard file editor, deployment from version control, firewall rules at the edge, and tested backups. Write every exception down and audit the fleet each month.
In this article
Key points
- A baseline applied to every site beats a per-site checklist, because defaults are secure and gaps stand out.
- WordPress core does not include two-factor authentication, so add it for every administrator through a plugin or identity provider.
- Use SFTP, strict file permissions and DISALLOW_FILE_EDIT, and delete plugins and themes you do not use.
- Deploy from version control and never edit live files, WordPress core or third-party plugins.
- Put a firewall with rate limits in front of the site, and test a restore of your backups.
Running one WordPress site securely is a list of tasks. Running a fleet is a different problem: the tasks are the same, but the chance that one site is missing one of them grows with every site you add. The attacker only needs the one you forgot.
My answer is a baseline. Every site gets the same controls, in the same way, from the first day. Exceptions are written down. This post lists the baseline I apply, the reasons, and the official WordPress and Cloudflare documents behind each part. It is not a promise that a site cannot be hacked. It is a way to remove the common mistakes and to recover quickly when something goes wrong.
Why a baseline beats a checklist per site
A per-site checklist depends on memory and on how busy the week is. A baseline depends on defaults. When a new site starts from a standard setup, the secure choice is the easy one, and a missing control stands out because it is a deviation.
The baseline also helps a search business, not just an IT one. Google’s spam policies define hacked content as content placed on a site without permission because of security vulnerabilities, with code injection and page injection as examples. A hacked site can lose visibility and trust quickly, and cleaning it up takes far longer than the hour it takes to apply the controls below.
The baseline at a glance
| Layer | Control | Why |
|---|---|---|
| Accounts | Strong unique passwords, two-factor authentication for every administrator, lowest role that does the job | Stolen or guessed logins are a common way in |
| Updates | Core, plugins and themes updated on a schedule, unused ones deleted | Known flaws in old code are easy to attack |
| Files | Strict permissions, file editor in wp-admin disabled, SFTP only | Limits what a stolen login or a flawed plugin can change |
| Code | Deploy from version control, no edits to core or third-party plugins, escape all output | Every change is reviewable and reversible |
| Edge | Firewall rules and rate limits in front of the site | Bad traffic is stopped before it reaches the server |
| Recovery | Regular backups and a tested restore | You can return to a clean state |
Accounts and logins
Most of the baseline is about how people get in. WordPress’s own brute force guidance lists the key defenses: strong unique passwords with a password manager, two-factor authentication for administrators, rate limits on login attempts at the edge or the web server, and disabling XML-RPC if you do not need it. It also says plainly that WordPress core does not include two-factor authentication, so it has to come from a plugin or your identity provider. And it warns that hiding the login URL can reduce noise but should not be your only defense.
Least privilege
WordPress has six predefined roles, each with a set of capabilities, as the roles and capabilities documentation explains. I give each person the lowest role that lets them do their job. A writer does not need to install plugins. A client who edits pages does not need to be an administrator. Fewer administrators means fewer accounts that an attacker can use to take over the site.
Integrations get their own credentials
When a tool needs access, use an application password instead of a shared login. WordPress describes application passwords as revocable, per-application credentials that avoid sharing your main account. If the tool is removed, the password is revoked and nothing else changes.
Remove what is not used
Old user accounts from former staff, freelancers and agencies are a quiet risk. In a fleet I review the user list of each site on a set schedule, and I remove access the same day someone stops working on it.
Updates
The documentation on upgrading WordPress explains the current defaults. Minor core releases update automatically. Since WordPress 5.6 new installations also update to major releases by default, unless WordPress detects a version control checkout. For plugins and themes, background updates happen by default only in special cases chosen by the WordPress security team for critical fixes. You can turn on updates for all plugins and themes with filters, or control core with the WP_AUTO_UPDATE_CORE constant.
For a fleet this means a choice, not a default. My approach is to let security-critical updates through quickly and to test the rest on a staging copy before they reach the live site, especially on stores where a plugin update can break checkout. Whatever you choose, write it down for every site, so that no site is left on “whatever it was when we built it”.
The simplest update rule is also the strongest: delete what you do not use. The official hardening guide says to keep plugins updated and to delete any plugin you are not using. A deactivated plugin still sits on the server, and a flaw in it can still be reached.
On a fleet, timing matters as much as policy. I keep an update window for each site, so that updates do not land during a sale, a campaign or a busy trading day. After an update I check the pages that earn money: the checkout, the contact form and the main templates. If something breaks, version control and the backup give me a way back within minutes. The aim is that an update is a routine event with a known procedure, not a risk that people avoid until the plugin is two years behind.
Files, code and deployment
The official hardening guide covers several controls that I include on every site.
- Use SFTP, not plain FTP. It encrypts the password and the data in transit.
- Lock down file permissions. The guide suggests directories at 755 and files at 644, with the owner as your own account, and says
wp-config.phpshould be readable only by you and the web server, which generally means 400 or 440. - Disable the file editor. Adding
define( 'DISALLOW_FILE_EDIT', true );towp-config.phpremoves the capabilities to edit themes, plugins and files from the dashboard. The guide notes that this does not stop an attacker from uploading malicious files, but it can stop some attacks.
Deploy from version control
The strongest control in my baseline is a rule about process: code reaches the live site from version control, not from edits on the server. I described the workflow in the post on a simple Git workflow for WordPress themes. A change that comes from a reviewed branch has an author, a reason and a way back. A change made on a live file has none of these, and if a file changes on its own, I know something is wrong.
The same rule keeps a fleet clean in two more ways. I do not edit WordPress core or third-party plugins, because the next update will erase the change or conflict with it. And all theme code escapes output and validates input. WordPress’s security guidance for developers sets the principles: do not trust any data, validate and sanitize input, escape on output and use the WordPress API for these tasks. Page builders add a large amount of third-party code to every site, which is one reason I stopped using them, as I explain in the post on why I stopped using page builders for client sites.
A secure fleet is a boring fleet: the same setup on every site and nothing edited by hand.
Own-ur-Rehman Sheikh
Edge, monitoring and recovery
A firewall in front of the site
The hardening guide notes that a website firewall can sit as an intermediary between internet traffic and your host, as a reverse proxy that filters bad requests before they arrive. Cloudflare’s web application firewall documentation describes this: the WAF filters undesired traffic with rules, offers managed rulesets that are updated regularly, and includes rate limiting rules. For WordPress I use rate limits on the login path and on xmlrpc.php if it must stay on, plus the managed rules. My full set-up is in the post on Cloudflare in front of WordPress. The WordPress guidance prefers edge or server-level throttling because a login-limiting plugin still runs in PHP and uses server resources during an attack.
Logs and change monitoring
The hardening guide says logs are the best way to understand what happened, and recommends monitoring files for changes, because prevention is sometimes not enough. For a fleet I want two alerts: a file changed that I did not deploy, and a new administrator account. Both are rare in normal life, so either one is worth a look.
Backups you can restore
The WordPress backup guidance says that with a proper backup of your database and files you can quickly restore things. The hardening guide adds an example worth remembering: a site that keeps weekly snapshots can still rebuild from a clean copy even if a compromise from early in the month is only found days later. A backup is only worth something if a restore has been tested, so I test a restore on a staging copy on a regular schedule, not only when a site is down.
Running one baseline across many sites
A baseline only works if it is applied the same way each time. Four habits make this practical.
- One written standard. A single document lists every control, with the setting and where it lives. A new site is built from it, and an old site is audited against it.
- Shared code for shared rules. Settings that every site needs can live in one small plugin or, where it makes sense, in a must-use plugin. The WordPress documentation on must-use plugins says they are always on and cannot be disabled by accident, and also warns that they do not show update notices, so you must track their updates yourself.
- A scheduled audit. Once a month, check each site against the standard: administrators, plugin list, file permissions, firewall rules, backups. Record the result.
- A written exception list. If a site needs a different setting, write the reason and a date to review it. An exception without a reason becomes a hole.
This work sits next to technical SEO, because both depend on a clean, predictable site. Rank Ray’s technical SEO audit guide covers the search side of the same discipline.
A first-day checklist for any new site
- Create named accounts with the lowest role needed. Turn on two-factor authentication for every administrator.
- Disable the dashboard file editor, set file permissions and use SFTP only.
- Delete unused themes and plugins, then set an update plan for the rest.
- Put the site behind a firewall with rate limits on login and XML-RPC.
- Set up backups and test one restore.
- Connect the site to version control so that nothing is edited on the live server.
- Add the site to the monthly audit list.
None of these steps is clever. That is the point. A fleet stays safe through repetition, and through noticing quickly when one site starts to differ from the others.
FAQ
Does WordPress include two-factor authentication?
WordPress core does not include it. The official brute force guidance says to add it through a plugin or your identity provider and to enable it for administrators.
What does DISALLOW_FILE_EDIT do?
It removes the capabilities to edit themes, plugins and files from the dashboard. The official hardening guide says it will not stop an attacker from uploading malicious files, but it can stop some attacks.
Should I turn on automatic updates for plugins?
It is a choice. By default WordPress updates plugins in the background only in special security cases, and you can enable all plugin updates with a filter. On stores I test updates on a staging copy first.
Why not edit files directly on the live site?
A change made on a live file has no author, no review and no easy way back. Deploying from version control gives every change a record, and an unexpected file change becomes a warning sign.
How often should I test backups?
On a regular schedule, not only after a failure. A backup is only useful if a restore works, so I test a restore on a staging copy.




