XML-RPC is an old WordPress feature that lets other apps post to your site without the normal login screen. Attackers often target it with login attempts. It was built before modern interfaces existed.
Today it is rarely needed on a normal business site, yet it is switched on by default.
What is XML-RPC?
XML-RPC is a remote interface reachable through the file xmlrpc.php. Apps and services use it to post content and manage a site without using the admin screen.
XML-RPC is a protocol in which a program sends a request written in XML to a web address and gets an answer in XML. In WordPress the address is xmlrpc.php in the site root. A client can authenticate with a username and password and then create posts, upload media or read data.
It was important when blogging apps and publishing tools needed a way to talk to a site. WordPress later added the REST API, which is the interface current features use. XML-RPC stayed for compatibility, and many sites still expose it without anyone using it.
What XML-RPC means for your PHP site
Which PHP version does your site report?
We read only what your site already sends in public: the headers and the top of the homepage. No scan, no login.
Every public endpoint that accepts logins is part of your attack surface. Because xmlrpc.php sits at the same address on every WordPress site, bots do not need to search for it. They try it against huge numbers of sites.
Requests can also be batched, so a bot can attempt several passwords per request, and that can push load onto your server.
Having it enabled is not a vulnerability in itself. The risk is weak or reused passwords, accounts that are not needed, and a server that has to run PHP for every request the bot sends. Each request to xmlrpc.php starts WordPress, which costs server resources even when the login fails.
How to check and decide
Look in your access logs for requests to xmlrpc.php. Many hits from the same addresses with POST requests suggest automated attempts. Then ask what depends on it: a mobile app, a publishing tool, a backup or management service, or an old plugin.
If none of those apply, you can block access safely. If one does, restrict it to the addresses that need it, or replace the tool with one that uses the REST API.
Blocking can be done in the web server configuration, in a security plugin or by a firewall rule in front of the site. After any change, test the things you rely on, then confirm that a request to xmlrpc.php no longer returns a working response. Set strong, unique passwords and add a second login step for every admin account, whatever you decide about XML-RPC.
Response headers can add another layer. See security headers for what they cover, and note that they do not replace blocking an unneeded interface.
When XML-RPC is a reason to rebuild
If xmlrpc.php, the login page and several plugins all exist to run a site whose content rarely changes, the cleaner answer is to remove the application from the public server. A static site has no WordPress login, no xmlrpc.php and no database to query during a page view. That gives a smaller attack surface, though forms, hosting accounts and build tools still need protection.
This is what our WordPress to static site service delivers.
When to act
Act when your logs show steady traffic to xmlrpc.php, when your server slows under login attempts, or when you realize nobody uses the interface. If the site already shows signs of a break-in, such as unknown admin users or odd files, ask us to fix your WordPress website.
Not sure how this applies to your site?
Ask a person to take a look. We check which PHP version your site runs and whether the fix is in, and tell you the next step.
Or have PHP updated right away: PHP update from $555 excl. VAT
Frequently asked questions
What is xmlrpc.php?
It is a file in the root of a WordPress site that accepts remote requests in the XML-RPC format. Apps and services can use it to log in and publish content without opening the admin screen.
Do I need XML-RPC enabled?
Often not. Newer WordPress features use the REST API, which is a separate interface. Some older mobile apps, publishing tools and plugins still use XML-RPC, so check what you rely on before you block it.
Why do attackers target xmlrpc.php?
It is at a predictable address on every WordPress site and accepts login attempts. A single request can bundle several attempts, which makes guessing passwords more efficient for a bot. It is a known pattern, so logs often show traffic to it.
How do I block XML-RPC?
You can block requests to xmlrpc.php at the web server or in a security plugin, or restrict them by IP address. Test afterwards that the services you need still work, and keep strong passwords and two-factor login regardless.