Stopping wp-login.php and XML-RPC brute force without breaking WordPress

By TurnUpHosting Web Services LLC · · #wordpress #brute-force #web-security

Every WordPress site receives login attempts against wp-login.php and xmlrpc.php. On a server with many sites, these requests alone can use a surprising share of CPU, because each one starts PHP and queries the database.

Why XML-RPC is a special case

XML-RPC supports a method called system.multicall, which bundles many calls into one HTTP request. Attackers use it to try dozens or hundreds of passwords per request, which also slips past simple "requests per minute" limits. XML-RPC is also abused for pingback-based floods against other sites.

Defences, from the edge inward

  1. Block at the server, not in WordPress. A security plugin only runs after PHP and WordPress have loaded, so the attack still costs resources. Detecting attempts in the web server logs and blocking the address in the firewall stops the cost entirely.
  2. Count POSTs, not page views. A burst of POST requests to wp-login.php or xmlrpc.php from one address is a reliable signal; normal visitors rarely post to either.
  3. Turn on two-factor authentication for every administrator and editor.
  4. Use unique usernames. Remove the default admin account and avoid exposing usernames through author archives if it matters to you.

Should you disable XML-RPC?

If nothing uses it, yes. But check first: the WordPress mobile app, Jetpack and some publishing tools rely on it. A safer middle ground is to keep it on but block clients that misuse it, which is what server-level rate limits do.

Shared hosting tips

  • Apply the protection server-wide rather than per site; you can't count on every customer to install a plugin.
  • Verify search engine crawlers by reverse DNS before rate-limiting them, so SEO isn't affected.
  • Allowlist your own monitoring and deployment tools.

TurnUpSecurity Shield watches every site's access logs for bursts of wp-login.php and xmlrpc.php POSTs and blocks the source in the kernel within milliseconds. It never touches WordPress itself, and verified search engines are never blocked.