Your WordPress login page is the front door to your website. It is where you sign in to write posts, update pages, and manage your business online. Unfortunately, it is also the page that automated attacks try first. Bots scan the internet looking for WordPress login pages, then try thousands of username and password combinations in the hope that one will work. This kind of attack is common, and it happens to small business websites just as much as to large ones. The good news is that protecting your login page is a simple job, and a few sensible steps will stop almost all of these attacks. This guide explains how to protect your WordPress login page from attacks, in plain language.
Understand what the attacks look like
The most common attack is called a brute force attack. A computer program tries to log in to your site again and again, guessing usernames and passwords. It starts with the obvious ones, such as "admin" as the username and "password" or "123456" as the password, then works through long lists of common combinations. A single bot can try thousands of guesses in an hour. If your password is weak, or if your username is easy to guess, it may eventually get in. Once inside, an attacker can change your content, add spam links, or lock you out of your own site.
Start with a strong username and password
The first step costs nothing and takes a few minutes. Change your username if it is still "admin", because that is the first username every bot tries. Create a new user with a less obvious username and administrator rights, then delete the old admin account, making sure to transfer its posts to the new account. Your username should not be the same as your display name or your business name if that is easy to guess from your website. Pick something that is not obvious to a stranger.
Next, use a strong password that is long and unique to your WordPress site. A good password is at least twelve characters and mixes letters, numbers, and symbols, or is a passphrase made of several unrelated words. Do not use your business name, your birth year, or a password you use anywhere else. A password manager can generate a strong password and remember it for you, so you do not have to memorise it. Change your password if you have ever shared it with anyone, if you suspect it may have been exposed, or if you have used it on other websites. This single step blocks the majority of automated login attacks.
Limit login attempts
WordPress lets anyone try to log in as many times as they like by default, which is exactly what brute force attacks rely on. A login limit plugin changes that. It locks an account or an IP address for a period of time after a small number of failed attempts, usually three to five. After a few failures, the bot is blocked and has to wait, which makes large-scale guessing impractical. Most security plugins include this feature, and there are also small plugins that do only this one job.
Turn on two-factor authentication
Two-factor authentication, often called 2FA, adds a second step to logging in. After you enter your password, WordPress asks for a code from an app on your phone. Even if an attacker guesses your password, they cannot log in without your phone, which makes your site far harder to break into. Many security plugins include two-factor authentication, and there are also dedicated plugins that add it. Set it up for every user account with administrator access, not just your own, because an attacker only needs one weak account to get in.
More ways to protect the login page
Beyond strong passwords and login limits, a few extra steps make your login page much harder to attack. Change the login address if your security plugin offers that option, so the login page is no longer at the usual address that bots scan for. This is not a complete defence on its own, because a determined attacker can still find it, but it stops the large number of bots that only try the default address. Keep your WordPress core, theme, and plugins updated, because updates often fix security problems that attackers use to get in. Turn on automatic updates for minor releases if you can, and check for updates at least once a week.
Use a security plugin that watches for suspicious activity and blocks bad IP addresses automatically. Many of these plugins also check your files for changes, which can alert you early if something goes wrong. Make regular backups as well, and store them somewhere other than your website, so you can restore your site quickly if an attack ever succeeds. A backup is not a way to prevent an attack, but it is the fastest way to recover from one. If you would like professional help securing your site, see our web design services. Our guide on how to keep your business website secure covers backups, updates, and other habits that keep a WordPress site safe.
Keep your user accounts tidy
Every user account on your site is a possible way in, so keep the list short. Delete accounts that belong to people who no longer work with you, and give each remaining user only the access level they actually need. A person who only writes blog posts does not need administrator access. Review the user list every few months, and remove any account you do not recognise. If you work with a freelancer or an agency, give them their own account rather than sharing yours, and remove it when the work is finished.
Frequently asked questions
What is the most common WordPress login attack?
The most common attack is a brute force attack, where an automated program tries thousands of username and password combinations on your login page. It usually starts with obvious usernames such as "admin" and common passwords. A strong, unique password and a limit on login attempts will stop almost all of these attacks.
Do I need a security plugin to protect my login page?
A security plugin makes the job much easier, because it can limit login attempts, add two-factor authentication, and block suspicious addresses automatically. You can protect your login page without one by using a strong password and limiting attempts manually, but a good security plugin is worth installing for most small business sites.
What is two-factor authentication and should I use it?
Two-factor authentication adds a second step to logging in, usually a code from an app on your phone. Even if someone guesses your password, they cannot log in without your phone. You should turn it on for every administrator account, because it is one of the strongest protections available and only takes a few minutes to set up.
How often should I change my WordPress password?
Change it straight away if you have shared it, used it on other websites, or suspect it may have been exposed. Otherwise, a strong, unique password does not need to be changed on a fixed schedule. What matters more is that it is long, unique to WordPress, and protected by two-factor authentication.
Protecting your WordPress login page is a short job with a lasting benefit. Use a strong, unique password and a username that is not "admin", limit login attempts, turn on two-factor authentication, keep everything updated, and keep your user accounts tidy. These steps will stop the vast majority of automated attacks and keep your website in your hands. If you would like help securing your WordPress website or rebuilding one that has been attacked, please contact Shehryar Noor and tell him about your business.