Stop Brute-Force Login Attacks and xmlrpc.php Abuse on WordPress
Your logs show thousands of login attempts or requests to xmlrpc.php. Limit them without breaking legitimate apps.
Bots try common passwords against wp-login.php and xmlrpc.php all day. Strong passwords already make this harmless, but heavy traffic can slow the site.
Step 1: Strong passwords and two-factor

This is the real defence. See our security checklist.
Step 2: Limit login attempts

Use a trusted plugin or your host's firewall that blocks an address after several failed tries.
Step 3: Handle xmlrpc.php

xmlrpc.php is an old remote-access interface. Some apps and plugins still use it, for example the Jetpack plugin. If you do not need it, block it. On Apache, add this to .htaccess:
<Files xmlrpc.php>
Require all denied
</Files>
If something stops working afterwards, remove the block.
Step 4: Use a firewall or CDN

A web application firewall in front of your site filters most bot traffic before it reaches WordPress. Many hosts include one.
Step 5: Check for real damage

Unknown administrators or changed files mean a break-in. See our hacked-site guide.
Related guides
- WordPress User Can't See Posts They Created: Roles and Permissions
- WordPress Site Health Warnings: What To Fix First
- WordPress: Create a New Admin User via Database When Locked Out
- WordPress Automatic Updates: Enable, Disable and Safe Settings