Here’s something most WordPress site owners never see: right now, somewhere in the world, a bot is probably trying to log in to your website. It doesn’t know you, and it doesn’t care what your site is about. It simply visits yourwebsite.com/wp-login.php, types “admin” and a common password, and when that fails it tries again, and again, sometimes thousands of times a day.
It’s a bit unsettling the first time you notice it in a security log. The good news is that these attacks are lazy. They rely on weak passwords, guessable usernames and sites that let them keep trying forever. Close those few gaps and almost all of them simply give up and move on to an easier target.
Your login page really is the front door of your website. If someone gets through it as an administrator, they can change your content, add spam links, install malware or lock you out completely, and cleaning that up is far harder than preventing it.
This guide walks through the changes that actually matter, in a sensible order. None of them need coding, and most take just a few minutes.
Quick Checklist
If you only have ten minutes today, start at the top of this list and work your way down.
| Step | Why it matters | Time |
| Use a unique, strong password | Stops simple guessing attacks | 2 min |
| Turn on two-factor authentication | A stolen password alone isn’t enough | 5 min |
| Limit login attempts | Bots get blocked after a few tries | 3 min |
| Avoid “admin” as a username | Bots guess it first | 5 min |
| Add a CAPTCHA to the login form | Filters out automated logins | 5 min |
| Protect the login page in Cloudflare | Blocks attacks before they reach your site | 10 min |
| Remove old admin accounts | Fewer doors to break into | 2 min |
| Keep WordPress and plugins updated | Closes known security holes | Ongoing |
How to Lock Down Your WordPress Login, Step by Step
Before you start: take a quick backup of your site. Security plugins rarely cause problems, but if one does lock you out, a fresh backup makes it painless. Our guide to backing up and restoring a WordPress site shows how.
1. Use a strong, unique password
This sounds obvious, but it’s still the number one reason WordPress sites get broken into. If your admin password is your pet’s name, your phone number, or the same one you use for email, a bot will get there eventually.
Use a long password of at least 16 characters, made up of random words or characters, and never reuse it anywhere else. The easiest way is to let a password manager create and remember it for you. See our picks of the best password managers for small businesses.
2. Turn on two-factor authentication (2FA)
This is the single most effective step on this list. With 2FA on, logging in needs your password and a short code from an app on your phone. Even if someone steals or guesses your password, they still can’t get in.
WordPress doesn’t include 2FA on its own, so you’ll add it with a free plugin. Good options include Two Factor (made by WordPress contributors), Wordfence Login Security and WP 2FA. Install one, open its settings from your user profile, scan the QR code with an authenticator app, and save the backup codes somewhere safe.
Not sure which authenticator app to use? Read Google Authenticator vs Microsoft Authenticator vs Authy. For more on how 2FA works across all your accounts, see how to set up two-factor authentication on your business accounts.
3. Limit login attempts
By default, WordPress lets anyone try to log in as many times as they like. That’s exactly what brute-force bots rely on. A login-limit plugin blocks an IP address after a few failed tries, for example five wrong passwords in a few minutes.
Limit Login Attempts Reloaded is a popular free option, and Wordfence includes this feature too. Many hosts, including those using LiteSpeed servers, also offer brute-force protection at server level, so check your hosting panel first.
4. Don’t use “admin” as your username
Bots almost always try “admin” first, followed by your site name. WordPress doesn’t let you rename a username, but you can create a new administrator with a less obvious username, log in as that new user, then delete the old account. When WordPress asks what to do with the old user’s posts, choose Attribute all content to your new account so nothing is lost.
It’s also worth setting a public display name in your profile that’s different from your username, so the name shown on your posts doesn’t give away half of your login.
I did exactly this when I moved my own blog to new hosting. Instead of carrying the old login across, I set up a fresh administrator account, stayed well away from “admin” and the other usual names, moved every post over to the new account and then deleted the old one. It took about ten minutes, and not a single post was lost along the way.
5. Add a CAPTCHA to the login form
A CAPTCHA asks visitors to prove they’re human before they can log in. Cloudflare Turnstile is a good modern choice: it’s free, it usually works invisibly without making people click on traffic lights, and plugins like Simple Cloudflare Turnstile add it to your login page in minutes.
6. Protect the login page with Cloudflare
If your site already uses Cloudflare, you can stop many login attacks before they even reach your server. In Cloudflare, go to Security → WAF → Custom rules and create a rule that applies to requests where the URI path contains /wp-login.php. Set the action to Managed Challenge. Real people pass through with barely a pause, while most bots are turned away.
If you always log in from the same country, you can make the rule stricter by challenging only visitors from other countries.
7. Consider changing the login URL
Plugins like WPS Hide Login let you move your login page from /wp-login.php to an address only you know, such as /my-team-entry. It won’t stop a determined attacker, but it removes you from the list of sites that dumb bots hammer every day, which keeps your logs much quieter.
Just make sure you bookmark the new address. Forgetting it is the most common way people lock themselves out.
8. Remove accounts you don’t need
Go to Users and look at everyone with the Administrator role. Old freelancers, developers who finished their work months ago, test accounts you forgot about: each one is another door into your site. Delete accounts that aren’t needed, and give people the lowest role that lets them do their job, such as Editor or Author instead of Administrator.
9. Turn off what you don’t use
WordPress has a feature called XML-RPC that older apps used to post remotely. Most modern sites don’t need it, and attackers sometimes use it to guess passwords in bulk. Many security plugins have a simple switch to disable it. If you use the WordPress mobile app or Jetpack, check whether they need it before you turn it off.
10. Keep everything updated
A lot of break-ins don’t come through the login page at all. They come through an old plugin with a known security hole. Turn on automatic updates for minor WordPress releases, update plugins and themes regularly, and delete plugins you no longer use. Fewer plugins means fewer things that can go wrong.
Locked Yourself Out? Here’s How to Get Back In
It happens to almost everyone at least once: a lost phone, a forgotten custom login URL, or a security plugin that blocked your own IP address after a few typos. Don’t panic. You can nearly always get back in through your hosting control panel.
- Lost your 2FA phone: use one of the backup codes you saved when you set it up. If you don’t have them, go to your host’s File Manager, open wp-content/plugins/, and rename the 2FA plugin’s folder (for example two-factor to two-factor-off). That turns the plugin off, and you can log in with just your password. Rename it back and set up 2FA again once you’re in.
- Blocked by a login-limit plugin: wait for the lockout to expire, usually 20 minutes to a few hours, or rename that plugin’s folder in the same way.
- Forgot your custom login URL: rename the WPS Hide Login folder, and /wp-login.php will work again.
- Forgot your password: use Lost your password? on the login page. If the reset email never arrives, your host’s WordPress manager usually lets you reset the admin password directly.
If none of that works, your host’s support team can help, and a recent backup means you’re never in real trouble.
FAQ
Is changing the login URL enough to secure WordPress?
No. It cuts down on bot noise, but it’s not real protection on its own. A strong password and 2FA matter far more.
Will these security plugins slow down my site?
Login-focused plugins like Two Factor or Limit Login Attempts Reloaded are very light and only run on the login page. Full security suites do more work, so use one, not several that overlap.
Do I need 2FA for every user?
It’s essential for administrators and anyone who can publish content. For subscribers or customers, it’s optional.
Can I use passkeys with WordPress?
Not out of the box, but there are plugins that add passkey login. Read passkeys explained to see whether they’re right for you.
Someone keeps trying to log in to my site. Should I worry?
Not really. Almost every WordPress site gets these attempts. As long as you have a strong password, 2FA and login limits, they’ll simply fail.
What if my site has already been hacked?
Change all passwords from a clean device, check for unknown admin users, and follow a proper clean-up process. Our WordPress troubleshooting guide is a good place to start.
Final Word
You don’t need to be a security expert to keep your WordPress login safe. A strong password, two-factor authentication and a limit on login attempts will stop the vast majority of attacks, and together they take less than fifteen minutes to set up. Add Cloudflare or a CAPTCHA if you want an extra layer, tidy up old accounts, and keep things updated.
It’s a small effort for a lot of peace of mind. The bots will keep knocking, but they’ll keep finding the door locked.
For the bigger picture, see our small business cybersecurity guide.


