Locking down the WordPress login on a small business site
Short answer: Most attacks on a WordPress login are bots guessing passwords, so the biggest gains come from strong unique passwords, two-factor login for every administrator, and rate limiting before requests reach WordPress. After that, give each person their own account with the lowest role that does the job, use application passwords for integrations, deal with XML-RPC, and remove old users. Hiding the login URL is a minor extra, not a defence.
If your server logs show thousands of hits on wp-login.php overnight, you're not being singled out. WordPress's own brute-force guide explains that these attempts are automated and often spread across many machines, and that even unsuccessful attacks can swamp a site with requests. For a small business, that can mean a slow site on a Monday morning as well as a risk of being broken into.
Work through the list below in order. The first four items do most of the work.
Priority 1: Passwords and named accounts
- [ ] Every person has their own login. No shared "office" account. When someone leaves, you remove one user and nothing else breaks.
- [ ] No account called
admin. WordPress's documentation says not to use that username, and its hardening guide notes that names likeadminorwebmasterare typically attacked first. - [ ] Long, unique passwords from a password manager. WordPress shows a strength meter when you change a password; treat anything short of "strong" as unfinished.
- [ ] The hosting control panel, database and email accounts tied to the site have strong passwords too. A locked front door doesn't help if the side gate is open.
Priority 2: Two-factor login for administrators
- [ ] Turn on two-factor authentication (2FA) for every administrator and anyone else with publishing or shop-management power. The brute-force guide is explicit that WordPress core doesn't include 2FA, so it comes from a security plugin or your identity provider. The guide lists authenticator apps and hardware keys, with text messages as a fallback.
- [ ] Consider passkeys. The same guide suggests passkeys (WebAuthn) through a reputable plugin as phishing-resistant login.
- [ ] Store backup codes somewhere safe, not in an email to yourself.
Plugins from security vendors such as Wordfence or Jetpack are common examples; compare features on their own pages and choose one, not three. Running several that do the same job adds complexity for little gain.
Priority 3: Slow the bots down before they reach WordPress
- [ ] Rate-limit login attempts at the edge or the server. WordPress's guidance prefers a web application firewall, CDN or host-level protection, because bad traffic is then blocked before it uses your server's resources.
- [ ] Use a login-attempt limiter as a fallback. If your host or CDN doesn't throttle logins, a security plugin can. The guide notes the trade-off: plugin-level limits still run inside PHP, so they consume some resources under a heavy attack.
- [ ] Add a challenge to the login form, such as a CAPTCHA-style check, to slow automated attempts.
- [ ] Ask your host what they already provide. Some hosts include a firewall or login protection in their plans; check before adding a plugin that duplicates it.
Priority 4: XML-RPC and application passwords
- [ ] Decide whether you need XML-RPC. The brute-force guide calls
xmlrpc.phpa frequent target, especially itssystem.multicallmethod. If nothing uses it, disable it. If something does (the guide mentions Jetpack and mobile apps as examples), restrict and rate-limit it. - [ ] Use application passwords for integrations. Introduced in WordPress 5.6, they let a trusted app or service connect without your real password, and each one can be revoked on its own. The core team's integration guide shows they are created, viewed and revoked from the Edit User screen, and points out why they matter: an interactive login step such as 2FA can't protect non-interactive routes like XML-RPC, so a guessed real password would be usable there.
- [ ] Name each application password after the tool using it ("Booking sync", "Accounting export") so you know what you're revoking later.
Priority 5: Roles that match the job
WordPress's roles documentation describes Administrator as someone with access to all administration features on a single site, with Editor, Author, Contributor and Subscriber each allowed progressively fewer capabilities.
- [ ] Keep administrators to one or two people. The brute-force guide recommends limiting the administrator count and using least-privilege roles for day-to-day work.
- [ ] Give content staff Editor or Author, not Administrator. Someone updating the blog doesn't need to install plugins.
- [ ] Use the shop or booking plugin's own roles for staff who only manage orders or appointments, where those roles exist.
- [ ] Give your web developer a separate administrator account that you can disable when the job is finished.
- [ ] Turn off the built-in file editor. The hardening guide explains that adding
define( 'DISALLOW_FILE_EDIT', true );towp-config.phpstops administrators editing theme and plugin code from the dashboard, which is often an attacker's first move after logging in.
Priority 6: Clean out old users
- [ ] Review the Users screen every quarter. Remove former staff, old agencies and test accounts.
- [ ] Reassign their content when WordPress asks, rather than deleting it.
- [ ] Revoke unused application passwords. The integration guide notes WordPress records when each was last used, which makes stale ones easy to spot.
Priority 7: Watch for trouble
- [ ] Turn on alerts for failed logins and new administrator accounts, through your security plugin or host.
- [ ] Check logs after anything odd, such as a sudden slowdown or an account you don't recognise. The guide recommends auditing logs for failed logins and banning abusive addresses temporarily.
- [ ] Keep backups somewhere separate from the site, so a locked-out admin is an inconvenience rather than a disaster.
What about changing the login URL?
Moving wp-login.php to a custom address cuts down the noise in your logs, and that has some value. But the hardening guide describes security through obscurity as generally an unsound primary strategy. Bots that find the new address will try it just the same, and a custom URL can confuse staff and break some plugins. Treat it as an optional tidy-up after the items above, never instead of them.
FAQ
Is a security plugin enough on its own?
It covers a lot, but protection at the host, firewall or CDN level stops attacks before they reach WordPress. Use both if you can, with only one security plugin.
Will disabling XML-RPC break anything?
It can, if a service, app or plugin relies on it. Check what connects to your site first, and restrict rather than disable if something needs it.
Should my web developer have a permanent admin login?
Only while they are working on the site. Give them their own account, then disable it or downgrade the role when the job ends.
Does password-protecting wp-admin help?
The hardening guide describes server-side password protection on /wp-admin/ as a second layer, but warns it can break features that use admin-ajax.php. Ask your host or developer to set it up and test it.
Getting the login right is usually a short job, and we can work through this checklist on your site with you.
Sources
- https://developer.wordpress.org/advanced-administration/security/brute-force/
- https://developer.wordpress.org/advanced-administration/security/hardening/
- https://make.wordpress.org/core/2020/11/05/application-passwords-integration-guide/
- https://wordpress.org/documentation/article/roles-and-capabilities/