Prevent Brute Force Attacks in WordPress
Last edited on July 10, 2026

Quick Answer

To stop WordPress brute force attacks, first reduce live pressure on wp-login.php and xmlrpc.php, then harden accounts with strong passwords, two-factor authentication, login limits, WAF or server rate limits, backups and log monitoring. Plugin-only protection helps small sites, but repeated login floods often need host-level controls because every failed login can still consume PHP and database resources.

This guide focuses on defensive WordPress administration and hosting controls. For background on authentication risk, see the OWASP Authentication Cheat Sheet.

Active Attack Triage

If the site is currently being hit, do not start with a long plugin comparison. Start with visibility, containment and account safety. The first goal is to reduce login endpoint pressure while keeping legitimate administrators able to recover access.

PriorityActionWhere to do itPass signal
ImmediateReview access logs for repeated wp-login.php and xmlrpc.php requests.Hosting panel, server logs or WAF logsYou know which endpoint is being abused and whether traffic is from a few IPs or a broad set.
ImmediateTemporarily rate-limit or challenge login traffic.WAF, security plugin or host firewallFailed-login volume drops without locking out the real admin.
TodayForce strong administrator passwords and remove unused admin accounts.WordPress Users screenOnly known administrators remain, with current contact details.
TodayEnable two-factor authentication for administrators and editors.Security plugin or identity providerCredential stuffing alone cannot open the admin account.
This weekConfirm backups, malware scan and restore path.Hosting panel and backup toolYou can recover if login abuse was paired with compromise.

Log Patterns To Check

Brute force traffic is often visible before a user reports a problem. These patterns do not prove compromise by themselves, but they tell you where to investigate.

POST /wp-login.php 200 repeated from many IPs
POST /xmlrpc.php 200 repeated with small request bodies
wp-login.php requests continue after normal users stop browsing
High PHP worker usage while page traffic stays flat

If these requests are paired with unknown admin users, changed plugin files, injected redirects or suspicious scheduled tasks, move from brute-force prevention into incident response. The deeper WordPress backdoor removal and prevention guide is a better next step in that case.

Plugin Controls vs Hosting Controls

ControlPlugin layerHosting or server layerImportant caveat
Login attempt limitsLimit attempts by username, IP or time window.Rate-limit requests before WordPress loads.Server-side limits reduce PHP load earlier.
Two-factor authenticationAdds a second step for admin users.Can be paired with identity or access policies.2FA protects accounts but does not reduce all bot traffic.
XML-RPC controlsDisable XML-RPC features or block specific methods.Block or restrict xmlrpc.php at the web server or WAF.Jetpack, mobile apps or integrations may need XML-RPC.
WAF rulesChallenge suspicious login behavior inside WordPress.Filter repeated login traffic before it reaches the app.Rules need testing so real admins can log in.
MonitoringShow failed logins and plugin alerts.Show access logs, PHP errors, resource spikes and firewall events.Both layers help diagnose repeated attacks.

Admin Account Hardening

  1. Remove unused administrator accounts and downgrade users who do not need admin access.
  2. Use unique passwords generated by a password manager.
  3. Enable two-factor authentication for administrators, editors and store managers.
  4. Confirm password reset emails go to current, protected inboxes.
  5. Review new user registration settings and disable public registration if it is not needed.

XML-RPC Decision Path

XML-RPC can be useful for older integrations, mobile publishing and some plugin workflows, but it is also a common target for login abuse. If the site does not need XML-RPC, blocking it can reduce noise. If the site does need it, restrict methods or traffic sources instead of making a blind change.

# Apache example: test on staging before production.
<Files "xmlrpc.php">
    Require all denied
</Files>

That example is for Apache-style configuration and should be tested before production. Nginx, LiteSpeed and managed hosting environments may require a different rule. For a deeper decision guide, see disable xmlrpc.php in WordPress.

WAF DDoS and Hosting Support

Brute force is not the same as a network-layer DDoS attack, but large login floods can still exhaust PHP workers, database connections or account resources. A WAF, host firewall or rate limit can help earlier in the request path than a WordPress plugin. For repeated resource pressure, review DDoS protection services and managed WordPress hosting as part of the broader hosting plan.

Ongoing Monitoring Checklist

  1. Review failed-login trends weekly and after traffic spikes.
  2. Check that 2FA is still enabled for privileged users.
  3. Confirm backups are running and restore steps are documented.
  4. Monitor plugin updates and remove abandoned extensions.
  5. Escalate to the host when login floods cause PHP, database or resource pressure.

Shared Hosting Managed WordPress and VPS Differences

The right control depends on where the site runs. On shared hosting, the site owner may only have plugin-level settings and a support ticket path. On managed WordPress hosting, the provider may help with WAF rules, backups, malware scanning, PHP limits and log review. On a VPS, the technical owner can add firewall rules, web server rate limits and custom monitoring, but that also means the owner must maintain the operating system and services.

EnvironmentGood first controlEscalation point
Shared hosting2FA, login limits and XML-RPC review inside WordPress.Ask support to review logs and account-level resource pressure.
Managed WordPress hostingProvider-supported WAF, backups, malware scan and admin hardening.Ask the provider to tune login challenges and inspect traffic patterns.
Self-managed VPSWeb server rules, firewall limits, log monitoring and plugin-level controls together.Move to managed support if no one owns patching, backups and incident response.

Preventive Maintenance Plan

After the immediate attack is under control, the work becomes routine. The site owner should review user roles monthly, confirm 2FA coverage after staff changes, test backups after plugin changes, and check failed-login trends after marketing campaigns or bot spikes. If failed login traffic returns every week, treat it as a hosting and firewall pattern, not just a WordPress settings issue.

Document the normal login path for real administrators, the plugin or WAF used for rate limits, the XML-RPC decision, the backup restore owner and the hosting contact path. That documentation prevents emergency confusion when the next login flood happens outside working hours.

Conclusion

Stopping WordPress brute force attacks requires layered controls. Start with logs and rate limits during an active attack, then harden administrator accounts, add 2FA, review XML-RPC, use WAF rules, keep backups ready and involve hosting support when login floods consume server resources.

About the Writer

Hassan Tahir writes Voxfor guides on WordPress hosting, server security and practical site operations. This update focuses on defensive controls for WordPress login abuse and hosting-layer escalation.

Frequently Asked Questions

How do I stop a WordPress brute force attack right now?

Check logs, rate-limit login traffic, challenge or block abusive sources, protect administrator accounts with 2FA, review XML-RPC traffic and ask the host to inspect server-level pressure.

Should I hide the WordPress login URL?

Changing the login URL can reduce simple bot noise, but it should be paired with 2FA, strong passwords, rate limits, WAF rules, backups and monitoring.

Does 2FA stop credential stuffing?

2FA makes stolen passwords much less useful, but it does not reduce all request volume. Rate limits and WAF rules are still needed during heavy login floods.

Should XML-RPC be disabled?

Disable or restrict XML-RPC when the site does not need it. If Jetpack, mobile apps or integrations require it, restrict methods or sources instead of blocking blindly.

Can a plugin stop every brute force attack?

No. Plugins help inside WordPress, but host-level rate limits, WAF rules and log review may be needed when login traffic consumes server resources.

When should I contact hosting support?

Contact hosting support when failed logins create resource spikes, the site slows down, XML-RPC traffic is heavy, logs are needed or firewall rules must be adjusted outside WordPress.

Leave a Reply

Your email address will not be published. Required fields are marked *