Secure your WordPress login: 7 effective measures

Titelbild: WordPress Login absichern: 7 wirksame Maßnahmen

Automated bots often attack unprotected WordPress sites by the second—usually via stolen or guessed credentials. You can effectively secure your WordPress login with seven measures: a long, unique password, two-factor authentication, limited login attempts, an administrator without a default name, a protected login page, bot protection, and cleanly managed user rights with limited sessions. Together they close the biggest gateway.

The login is the front door of your website. Whoever gets in there can change content, install plugins, view data and, in doubt, take over the whole site. At the same time this door is public: everyone knows the address /wp-login.php, and everyone can try there. That is exactly what automated programs do every day.

In this article we show you how to Secure your WordPress login . You get seven effective measures with concrete steps, a prioritization by effort and benefit and answers to the most common questions. If you want to know what the attacks you fend off with this look like, also read the article Detecting and stopping brute force attacks.

Why the login is so often the target

There are two ways to take over a WordPress site: via a vulnerability in outdated software (plugins, themes, or core) or via stolen or guessed credentials. The second way is often easier because it needs no technical hole. The password is the only hurdle. These factors make the login a target:

  • Known address: Every WordPress site has the same login path.
  • Known usernames: "admin" is still widespread, and author names can often be read.
  • Reused passwords: Data from breaches at other services is deliberately tried out.
  • Many authorized people: The more people have access, the greater the chance that one account is weakly protected.

You know the result of a successful attack: spam, redirects, malware and cleanup work. What to do then is described in the article WordPress hacked: What to do now.

Secure your WordPress login: featured image

The 7 measures at a glance

No. Measure Impact Effort
1 Long, unique password very high low
2 Two-factor authentication very high low
3 Limit login attempts high low
4 No user "admin" medium low
5 Protect or hide the login page medium low to medium
6 CAPTCHA or bot protection medium low
7 Limit rights and sessions medium to high low
Infographic: securing the WordPress login with 7 protective measures
Securing the login: 7 protective measures (click to enlarge)

Measure 1: long, unique password

The password is the foundation. It should be chosen so that no bot can guess it and so that it is not used anywhere else.

What a good password looks like

  • At least 16 characters, better more. Length beats complexity.
  • Random: No words, names, birthdays or keyboard patterns.
  • Unique: Every account gets its own password.
  • Passphrase as an alternative: Four to five random words, such as "Lamp-Tunnel-Cloud-Granite-Fox", are long, easy to type and strong.

Use a password manager

Nobody can remember dozens of long random passwords. A password manager (such as Bitwarden, 1Password, or KeePass) generates them, stores them encrypted, and fills them in automatically. You only have to remember one strong master password. Even managers built into the browser are better than reused passwords.

Watch out for data breaches

Check on established services like Have I Been Pwned whether your email address appears in known data breaches. If so, change all passwords you used there. Many password managers warn you about this automatically.

Measure 2: two-factor authentication (2FA)

With two-factor authentication, the login needs a second proof besides the password, usually a code from an authenticator app. If the password is guessed or stolen in a data breach, access still stays closed—and with passkeys, even against real-time phishing.

Which 2FA variants are there?

  • Authenticator app (TOTP): A code changes every 30 seconds. Secure, free, recommended.
  • Security key (passkey, FIDO2): A hardware key or the device itself confirms the login. Most secure and convenient.
  • SMS code: Better than nothing, but vulnerable to SIM swapping. Only as an emergency solution.
  • Email code: Only as secure as the email account itself.

How to set up 2FA

  1. Install a dedicated 2FA plugin (such as WP 2FA or Two Factor) or enable the function in your security plugin.
  2. Scan the QR code with an authenticator app.
  3. Confirm with the first code.
  4. Store the recovery codes in a safe place, for example in the password manager.
  5. Make 2FA mandatory for administrators and editors.

Test the process in a private window before you end the session in the main window. That way you avoid locking yourself out.

Measure 3: limit login attempts

WordPress allows an unlimited number of failed attempts out of the box. That can be changed with a plugin like Limit Login Attempts Reloaded or a firewall. Good settings:

  • 3 to 5 failed attempts, then a 15 to 30 minute block
  • Longer block on repetition, up to 24 hours
  • Email notification for suspicious patterns
  • Block also at user level, not only by IP address
  • Put your own IP address or your office one on the exception list so you do not lock yourself out

This measure makes dictionary attacks practically worthless, because after a few attempts it is over. Against distributed attacks with many IP addresses a firewall helps additionally (more in the article WordPress firewall).

Measure 4: no user "admin"

Many attacks start with the username "admin" because it exists in many installations. If you replace it, the attacker additionally has to guess the right name.

  1. Create a new administrator with an inconspicuous username that has nothing to do with your domain or your name.
  2. Log in with the new account and assign the content of the old account to the new one.
  3. Delete the "admin" account.
  4. Make sure that the display name on the front end is different from the username.
  5. Prevent usernames from being exposed via /?author=1 or the REST API route /wp-json/wp/v2/users so they cannot be read.

Measure 5: protect or hide the login page

With a plugin you can move the login to your own address. Old addresses like wp-login.php and wp-admin then return an error. That drastically reduces the automated requests.

Important here

  • This is not security through secrecy alone. The address can be found out.
  • Do not forget the new address: save it in the password manager.
  • Check whether other plugins or employees depend on the old address.

Additional protection via server

For very critical sites you can restrict access to /wp-admin and wp-login.php to certain IP addresses or add an additional server password (HTTP authentication). That is a hard hurdle that locks bots out completely.

Measure 6: CAPTCHA or bot protection

A CAPTCHA filters automated login attempts. Modern solutions work invisibly and hardly bother real visitors.

  • Choose a privacy-friendly solution, such as Cloudflare Turnstile or self-hosted variants.
  • Check GDPR compliance: depending on the provider you need consent or a data processing agreement.
  • Also put the CAPTCHA on password reset and registration, not only on the login.

Measure 7: limit rights and sessions

The fewer accounts with high rights exist, the smaller the attack surface. Go through the user list regularly.

  • Principle of least privilege: Editors do not need administrator rights, authors no plugin rights.
  • Delete old accounts: Former employees, interns and former agencies should no longer have access.
  • Limit sessions: Let logged-in sessions expire after a certain time and end "All other sessions" in the profile if a device was lost.
  • Disable file editing: With DISALLOW_FILE_EDIT even a hijacked account cannot inject code via the backend.
  • Activity log: A log shows you who changed what and when.

Secure the login in 30 minutes: schedule

  1. Create a backup (guide: Create a WordPress backup).
  2. Install a security plugin with login protection.
  3. Limit login attempts.
  4. Enable 2FA for all administrators and editors, save recovery codes.
  5. Renew passwords, set up a password manager.
  6. Replace user "admin", block author reading.
  7. Adjust the login URL or enable server protection.
  8. Set up CAPTCHA.
  9. Tidy up the user list.
  10. Test everything in a private window.

Typical mistakes and how to avoid them

  • Two accounts with the same password: If one is cracked, the second one is open too.
  • 2FA only for you: The weakest account decides. Everyone with access must use it.
  • Recovery codes lost: Without them you are locked out if a phone is lost.
  • Passwords sent by email: Use a password vault for secure sharing.
  • Login URL changed but password weak: That is just a camouflage coat.
  • No block for exceptions: Developer or agency access needs protection too.

What if someone has got in anyway?

Then: change credentials, check the site, clean it. You will find the guide in the article Remove WordPress malware. And in case something is lost, a backup is worth its weight in gold. How to restore it is shown in the article Restore a WordPress backup.

Login protection as part of the big picture

A secure login is important, but only one part. Updates, firewall and backups belong with it, as the security checklist shows. If you do not want to maintain all this yourself, we take care of it: the Security package costs $32 per month, the Wartung $99 per month. For acute problems the Emergency Recovery Service helps for $539.

Passkeys: logging in without a password

Passkeys are the new standard for secure logins. Instead of a password, your device uses a cryptographic key pair. The private key never leaves the device, the server only stores the public one. You confirm the login with a fingerprint, face recognition or device PIN. Because there is no password, nobody can guess one or capture it on a fake.

What this means for WordPress

  • Passkeys protect very well against phishing because they only work on the real domain.
  • There are plugins that enable passkeys or security keys for the WordPress login.
  • Plan a fallback in case a device is lost, for example a second key or stored recovery codes.
  • For administrators the switch is worthwhile, for visitor accounts it is optional.

Phishing: the attack no password stops

Even the strongest password does not help if you enter it yourself, namely on a fake page. Phishing emails often imitate WordPress, your host or payment services: "Your account will be blocked, please confirm your data." The link leads to a copy of the login page that forwards credentials and even the 2FA code in real time.

How to protect yourself

  • Never click login links in emails. Open the site yourself via a bookmark.
  • Watch the address in the browser bar, not the look of the page.
  • Use password managers: they only fill in passwords on the real domain. If nothing appears, something is wrong.
  • Use passkeys or security keys, which do not work on fake pages.
  • Train all employees with access briefly: A quick verification phone call for suspicious emails often prevents more damage than any technology.

Securing the login in teams and with service providers

As soon as several people have access, organization becomes more important than technology. These rules have proven themselves:

  1. Own access for each person: No shared accounts. That way you see in the log who did what.
  2. Rights by task: Editors get the editor role, an agency only gets administrator for the duration of the project.
  3. Limit access in time: When creating an external access, define when it expires.
  4. Offboarding: When an employee or service provider leaves, access is removed on the same day.
  5. Never passwords by email: Use a password vault or a one-time link process.
  6. 2FA for everyone: Also for service providers, without exception.

Login protection for shops and customer accounts

If your site has customer accounts, for example in a WooCommerce shop, a second login comes into play: that of your customers. Slightly different rules apply here because you cannot force your customers into complicated procedures.

  • Enable login limiting also on the customer login ("My account").
  • Put an invisible CAPTCHA on registration and password reset so bots cannot create fake accounts.
  • Optionally offer 2FA or passkeys to customers, especially if stored payment data is involved.
  • Require a minimum password length at registration and check for known leaks.
  • Notify customers by email about password changes.

Login audit: what you check once a quarter

Check item Target
User list Only current, known persons
Administrators As few as possible
2FA status Active for all administrators and editors
Passwords From the password manager, no reuse
Login log No logins from foreign countries or at unusual times
Blocked IPs Plausible, none of your own addresses among them
External access Only for ongoing projects
Recovery codes Available and stored safely

Practical example: agency access without protection

A mid-sized company had its website built by an agency three years ago. The agency access continued to exist, with a simple password and without 2FA. When an employee laptop was stolen at the agency, the credentials showed up in a leak. Two weeks later there was an unknown administrator on the company site and spam pages in the index.

Lesson: granting rights is easy, withdrawing rights is forgotten. Keep a list of all persons with access, check it once a quarter and demand 2FA from every external service provider. The cleanup cost many times what prevention would have cost.

Key terms around the login

Passphrase

A password made of several random words. It is long, easy to remember and thus often better than short character strings with special characters.

Password manager

A program that generates passwords, stores them encrypted and enters them automatically on the right site.

TOTP

The method behind most authenticator apps: a short-lived code is calculated from a secret key and the time.

Passkey

A login method without a password in which a private key on your device confirms the login. It is resistant to phishing.

Session

The logged-in state in the browser. If it does not expire or is stolen, someone can act in your name without a password.

Principle of least privilege

Every user gets only the rights needed for the task, and no more.

The key points in brief

  • Long, unique password from a password manager.
  • Two-factor authentication for everyone with access.
  • Limit login attempts and filter out bots.
  • No user "admin", only the permissions actually needed.
  • Check access regularly and remove former users.

The whole effort is about half an hour.

Several users, one login: Assign roles and permissions cleanly

As soon as more than one person works on your site, securing the login becomes a question of organization. Every additional administrator enlarges the attack surface, because a single weak password is enough.

The principle of least privilege

Give each user only as many permissions as their task requires. WordPress comes with ready-made roles for this:

  • Administrator: Only for people who need to install plugins and change settings. As few as possible.
  • Editor: Can manage posts and pages but not change technical settings. Ideal for content teams.
  • Author: Can write and publish their own posts.
  • Contributor: Can write drafts that an editor approves.

One account per person

Do not share accounts. With personal accounts you can see who changed what, and you can block individual access immediately when someone leaves the team. If you require a password manager for all team members, you also avoid reused and weak passwords.

External service providers

Set up separate accounts for agencies and freelancers and limit their access in time. Once the project is finished, delete the account. Enable two-factor login for all administrators and editors, because that is where the greatest damage lies if an account is taken over.

Review the user list once a quarter. Two minutes of checking prevent a forgotten account from staying open for months.

Conclusion

A secured login is the most effective single measure against takeovers. With a long password, 2FA, attempt limiting, a changed admin name, a protected login page, bot protection and tidy rights you close most attack paths. The effort is half an hour. If you want support with it, you can reach us via the Contact page , and you will find all services under Security.

Frequently asked questions about login protection

How do I best secure my WordPress login?

The combination of a long password, 2FA and login limiting is most effective. Everything else is a supplement.

Do I need a plugin for 2FA?

Yes, WordPress does not include 2FA out of the box. There are established plugins such as WP 2FA or Two Factor, many of them free.

Is it safe to change the login URL?

It helps against bots and reduces server load, but does not replace strong passwords. Use it as a supplement.

What to do if I have locked myself out?

Wait out the block, switch briefly to mobile data if your IP is blocked, use your recovery codes, or deactivate the security plugin via SFTP or your host's file manager by renaming the plugin folder.

Are password managers safe?

Yes, if you choose a strong master password and enable 2FA. They are much safer than reused passwords.

How often should I change passwords?

Not on a fixed schedule, but on suspicion or a data breach. Length and uniqueness are what count.

Who should have administrator rights?

As few people as possible, ideally one or two. Everyone else gets the smallest role their work allows.

Is a password with special characters enough?

Only if it is long and random. "Password!1" is very weak despite the special character and can be cracked in seconds.

What does the protection cost me at Boudmedia?

The security package costs $32 per month. We set up login protection, firewall and monitoring and keep them up to date.

Can I also log in with passkeys?

Yes, with suitable plugins. Passkeys are very secure and convenient because no password has to be typed.

Is a password manager in the browser enough?

For everyday use it is better than reused passwords. Better is a dedicated password manager with a master password and 2FA, especially if several people have to share access.

What to do if I opened a phishing email?

If you only opened it but entered nothing, usually nothing has happened. If you entered credentials, change the password immediately, end all sessions and check the user list and files for changes.

Amine Boudounite

About the author

Amine Boudounite

Amin is the founder of Boudmedia and builds WordPress websites, online shops and business sites. In his guides he explains technology, loading speed and visibility so that you can apply them without any prior knowledge.

Contents
Help with your WordPress site?

We take a free look and tell you honestly what is needed and what it costs.

Share post

You might also be interested in

WordPress Backend Slow? How to Speed Up the Dashboard

Wenn das WordPress-Dashboard träge ist: Ursachen und Maßnahmen im Überblick.

Finding and Fixing a WordPress Plugin Conflict

So findest du den Plugin-Konflikt in WordPress und löst ihn ohne Datenverlust.

Google Shopping with WooCommerce: How to Make Your Feed Error-Free

Wie ein sauberer Produktfeed für Google Shopping aussieht und welche Fehler du in WooCommerce vermeiden kannst.

Problems with your WordPress site? We fix them at a fixed price.

  • Free check of your site
  • Honest assessment of what is needed
  • Fixed price before we start
  • Reply within 24 hours on business days
Scroll to Top