xmlrpc.php is a WordPress file that accepts remote requests, and bots hit it constantly looking for weak passwords. By the end of this guide you will be able to tell routine noise from an attack in your web server logs, and know where to look to find out whether any login worked.
What you need
- Read access to your web server access log (Apache or Nginx), or the raw access logs from your host’s control panel
- Terminal or SSH access if you want to use the commands below, or a log viewer that can search text
- WordPress administrator access, plus WP-CLI (the WordPress command line tool) if your host provides it
- Any security plugin log or WAF log (a web application firewall, which filters web requests before they reach your site)
- A list of tools that legitimately talk to your site, such as Jetpack or a mobile publishing app
This guide assumes the combined log format, the default on most Nginx installs and a common choice on Apache. If your host uses a custom format, the field positions in the awk commands (a text-processing tool on Linux) will be different.
Step 1: Find the requests
XML-RPC is an older way for programs to talk to WordPress by sending XML over HTTP. Since WordPress 3.5 it has been switched on by default. Some mobile apps and remote publishing tools still use it, and Jetpack has used it for its connection to WordPress.com. Attackers like it because it accepts logins and pingbacks (automatic notifications between sites) without going through the normal login page.
The usual log locations are /var/log/nginx/access.log for Nginx, /var/log/apache2/access.log for Apache on Debian and Ubuntu, and /var/log/httpd/access_log for Apache on Red Hat style systems. On shared hosting, download the raw access log from your control panel instead.
Change to the log folder, then show the 20 most recent lines that mention the file:
grep "xmlrpc.php" access.log | tail -n 20Count only the POST requests, which are the ones that can carry logins:
grep -c "POST /xmlrpc.php" access.logOlder logs are usually compressed after rotation. The zgrep command searches those files the same way grep searches plain ones. If the oldest log you have starts after the activity you care about, say so in your notes rather than assuming nothing happened.
Step 2: Read a single log line
Here are two fictional lines. The sizes are illustrative and will differ on your site.
198.51.100.7 - - [23/Nov/2026:09:10:41 +0000] "GET /xmlrpc.php HTTP/1.1" 405 42 "-" "Mozilla/5.0 (compatible)"203.0.113.24 - - [23/Nov/2026:09:14:02 +0000] "POST /xmlrpc.php HTTP/1.1" 200 412 "-" "Mozilla/5.0 (compatible)"Left to right you have the client address, the time, the request line (method, path and protocol), the status code, the response size in bytes, the referrer and the user agent (the label the client sends to describe itself).
The first line is a GET request. In current WordPress releases, a GET to this file returns a short plain-text message saying it accepts POST requests only, normally with status 405. A scanner does this just to confirm the file exists. It is background noise unless it is followed by POSTs from the same address.
The second line is a POST, a request that sends data in its body. This is the kind to investigate. The access log does not store that body, so it cannot tell you which XML-RPC method was called or which username was tried. Keep that limit in mind through the rest of the guide.
Step 3: Narrow down by source, time and user agent
List the ten addresses sending the most POSTs:
grep "POST /xmlrpc.php" access.log | awk '{print $1}' | sort | uniq -c | sort -rn | head -n 10Group the same requests by hour to see whether traffic is a steady drip, a burst, or a daily pattern:
grep "POST /xmlrpc.php" access.log | awk '{print substr($4,2,14)}' | uniq -cList the user agents:
grep "POST /xmlrpc.php" access.log | awk -F'"' '{print $6}' | sort | uniq -c | sort -rn | head -n 10A handful of addresses with hundreds of requests each is the classic brute force shape (many password guesses against the same login). Many addresses with only a few requests each, all sharing one unusual user agent, points to a distributed run spread out to avoid rate limits.
Do not trust low counts too much. XML-RPC has a method called system.multicall that bundles many calls into one HTTP request, so a single logged POST can hide dozens of password guesses. Request counts understate the number of attempts.
If your site sits behind a CDN or reverse proxy (a service that forwards traffic to your server), the first field may show the proxy’s address, not the visitor’s. Check whether your log format records a forwarded-for address.
A separate abuse is pingback reflection, where attackers use your site to send requests to a third party. That shows up as outbound traffic from your server, not as anything unusual in this log. Unexplained bandwidth spikes or an abuse notice from your host are the clues.
Step 4: Check the response status and size
Count how often each status and size combination appears for the POST requests:
grep "POST /xmlrpc.php" access.log | awk '{print $9, $10}' | sort | uniq -c | sort -rn | head -n 10The result is easy to misread. XML-RPC reports a failed login inside the XML reply, as a fault with a 403 code. The HTTP status of the response is normally still 200. So a 200 does not mean the login worked, and a run of 200s does not mean the attack failed.
Size can help as a lead. A rejected login tends to produce the same small reply every time, so thousands of identical sizes from one address suggest repeated failures. A reply of a different size in the middle of that run is worth a closer look, because a successful call returns real data. Treat this as a hint. Multicall replies change size with the number of calls, and your own legitimate traffic will have its own sizes. Compare against known good requests from your tools first.
Other statuses mean different things. A 403 usually means a firewall or block rule stopped the request.
A 404 means the file is gone or hidden. A 5xx during a burst suggests the server is struggling under the load, so check CPU and memory as well.
Step 5: Look beyond the access log
Because the log cannot show success, check WordPress itself. If you run a security plugin with a login log or activity log, search it for the suspect addresses and for successful logins at the same times. WordPress does not keep a login history by default, so without a plugin this evidence may not exist.
If your WAF or ModSecurity setup logs request bodies, those logs can show the XML-RPC method and username. That only works if body logging was already switched on.
From the site root, list administrator accounts and when they were created:
wp user list --role=administrator --fields=ID,user_login,user_registeredVerify the WordPress core files against the official checksums:
wp core verify-checksumsDo the same for plugins installed from the official directory:
wp plugin verify-checksums --allLook for PHP files where none belong, such as the uploads folder:
find wp-content/uploads -name "*.php"List PHP files changed in the last seven days:
find . -name "*.php" -mtime -7Updates and plugin installs change files legitimately, so match each hit against your own activity before drawing a conclusion.
Did it succeed? How to tell
- Signs it worked: an administrator account you do not recognise, or one created around the time of the traffic
- Signs it worked: a security plugin log showing a successful login from a suspect address, or a login for an account that normally logs in from elsewhere
- Signs it worked: failed core or plugin checksums, or PHP files in the uploads folder that you did not put there
- Signs it worked: new posts, changed settings or password resets you did not make
- Signs it did not: the same small reply repeated for every request, no matching successful login in any plugin log, and clean checksums
- Signs it did not: 403 responses showing your firewall or block rule intercepted the requests
- Signs it did not: the user accounts, files and settings match what you expect after the activity window
Clean results lower the risk but do not prove safety. The access log cannot show login outcomes, logs may have rotated, and an attacker with valid credentials can look like a normal user.
If you find a hit
- Preserve evidence first: copy the access logs, security plugin logs and database backup off the server before changing anything
- Change the passwords of every affected administrator and of any account that reused them, then sign out all sessions from the profile screen
- Remove unknown administrator accounts only after you have noted their ID, creation time and email address
- Replace any file that fails a checksum with a fresh copy, and review anything unfamiliar in the uploads folder before deleting it
- Check the other entry points, since the same bots often target the standard login page too
- Do not wipe or rebuild the site until the evidence is copied and you have a working clean backup from before the activity
- If nothing worked and you do not use XML-RPC, block the file at the web server. For Apache 2.4, add this to the site’s configuration or .htaccess file:
<Files xmlrpc.php> Require all denied </Files>For Nginx, add this inside the server block, then run nginx -t to test the configuration before reloading:
location = /xmlrpc.php { deny all; }Blocking the file breaks anything that relies on it, so confirm which tools use it first.
Common problems and fixes
- Jetpack or a mobile app triggers alerts: legitimate tools also POST to this file, so check the user agent and the timing against what you use
- Only proxy addresses appear: log the forwarded client address, or use your CDN’s own logs
- Logs end too early: rotation or short retention removed them, so ask your host whether older raw logs exist
- Everything returns 403: your firewall may already be blocking the file, which makes the access log less informative
- A flood of GET requests with 405 responses: that is scanning, and it needs no action unless POSTs follow
- Server slows during bursts: rate limit or block the offending addresses at the firewall, not only in WordPress



