In this article · 5 sections
A brute force attack is when bots try thousands of username and password combinations on your login page until one works. WordPress wp-login.php, /admin panels, cPanel, email and FTP logins are all common targets. Weak or reused passwords make it easy; a few simple controls make it nearly impossible.
How to tell if you're being targeted
- Many failed logins in your CMS security log or server logs
- Hosting alerts about high CPU from login pages
- Account lockout emails you didn't trigger
- Traffic spikes to
/wp-login.php,/xmlrpc.phpor/admin/login
Types of brute force
- Classic: trying many passwords for one account
- Dictionary: common passwords like
Admin@123,password, business name + year - Credential stuffing: using email/password pairs leaked from other websites
- Password spraying: one common password tried across many accounts
Defences that work
- Strong unique passwords with a password manager. See password policy for small business
- Two-factor authentication for admin users. See 2FA guide
- Rate limiting: allow only a few attempts per IP per minute
- Account lockout or delays after repeated failures (with care, to avoid locking out real users)
- CAPTCHA on login after failed attempts
- Don't use "admin" as a username
- Firewall / WAF rules blocking known bad IPs. See WAF explained
- Restrict admin access by IP or add HTTP authentication on the admin folder
- Disable XML-RPC on WordPress if you don't need it
For custom PHP admin panels
- Hash passwords with
password_hash()and check withpassword_verify() - Store failed attempts in the database and block after a threshold
- Regenerate the session ID after login
- Log every login with IP and time
See our step-by-step secure PHP login tutorial.
FAQs
Does changing the login URL help?
It reduces bot noise but isn't real security on its own. Combine it with strong passwords and 2FA.
Will Cloudflare stop brute force?
Its rate limiting and bot features help a lot. See Cloudflare free plan.
Was this article helpful?
Your answer helps us improve our guides