Preventing WordPress Brute Force & XML-RPC Attacks Without Bloated Security Plugins
1. Why xmlrpc.php Is Still the #1 Target on Fresh WordPress Installs
Unless your editorial team actively publishes via legacy desktop blogging clients or Jetpack’s old remote protocol, xmlrpc.php is pure liability. Automated botnets exploit system.multicall inside XML-RPC to test hundreds of password guesses inside a single HTTP POST request—spiking PHP-FPM CPU and MariaDB connections.
Blocking xmlrpc.php at Nginx/Apache or Cloudflare WAF stops those floods before PHP ever boots, while adding add_filter( "xmlrpc_enabled", "__return_false" ); inside a 10-line MU-plugin closes application-level pingbacks cleanly.

location = /xmlrpc.php {
deny all;
access_log off;
log_not_found off;
}
2. Rate Limiting wp-login.php & Disabling File Modification in Production
Beyond blocking xmlrpc.php, configure a Cloudflare WAF rate-limiting rule on /wp-login.php (for example, blocking or challenging any IP exceeding 5 POST requests in 60 seconds). Inside wp-config.php, set DISALLOW_FILE_EDIT to true so even if an editor account is ever compromised, attackers cannot inject PHP via the Appearance → Theme File Editor screen.
FAQ — Should I change the wp-admin login URL? Obscurity helps reduce log noise, but Cloudflare WAF rate-limiting + strong 2FA/passkeys provide real cryptographic protection.