XML-RPC in WordPress: What It Is & Should You Disable It?
In this article
XML-RPC is a remote procedure call protocol that WordPress has supported since version 2.6, enabling external applications to communicate with your site. In practice, it powers the block editor's asynchronous requests, the Jetpack plugin, and mobile apps that post or manage content. Whether you should disable it depends on your security posture, performance needs, and whether you rely on any of these features. This article explains what XML-RPC does, why it matters, and how to decide if disabling it is right for you.
Background: Why WordPress Uses XML-RPC
XML-RPC (XML Remote Procedure Call) is a protocol from 1998 that uses HTTP as the transport and XML as the encoding to let a client call functions on a remote server. WordPress adopted it to allow external tools—like desktop editors, mobile apps, and third-party services—to interact with a site without needing a custom API. Before the REST API was introduced in WordPress 4.4 (2015), XML-RPC was the only official way to programmatically create posts, upload media, or manage comments.
Even after the REST API matured, WordPress kept XML-RPC enabled by default for backward compatibility. The block editor (Gutenberg) also uses it for certain operations, such as fetching reusable blocks or making asynchronous requests when the REST API is blocked by a caching plugin. Additionally, the popular Jetpack plugin relies on XML-RPC for many of its features, including publicize (auto-sharing to social networks), related posts, and some performance tools. If you deactivate XML-RPC, these integrations may break.
How XML-RPC Works in WordPress
When a client wants to perform an action, it sends an HTTP POST request to xmlrpc.php on your WordPress installation. The request body is an XML document containing the method name and parameters. For example, a mobile app might call wp.getUsersBlogs to authenticate, then wp.newPost to publish a draft. The server parses the XML, executes the corresponding function, and returns an XML response with the result or an error.
WordPress has a built-in list of XML-RPC methods, but plugins can add their own. The protocol supports authentication via username and password, which is one reason it has been a target for brute-force attacks. Each request is processed synchronously, meaning the server must handle the XML parsing and method execution, which can consume resources if many requests arrive at once.
Security Risks: Why Some People Disable It
The most cited reason to disable XML-RPC is security. Two specific threats are commonly mentioned:
- Brute-force amplification: An attacker can send a single request with multiple method calls (using the
system.multicallmethod) to try hundreds of password combinations in one go. This makes it easier to guess credentials without triggering rate limits that apply to individual login attempts. - DDoS amplification: Because
xmlrpc.phpis a single endpoint, attackers can send a flood of requests to it, consuming server resources. Thepingback.pingmethod can also be abused to send requests to third-party sites, making your server part of a reflection attack.
However, these risks are not unique to XML-RPC—the REST API and the login page can also be abused. Disabling XML-RPC eliminates one attack surface, but you should also implement strong passwords, two-factor authentication, and a web application firewall to protect other entry points.
Performance and Compatibility Considerations
XML-RPC can impact performance, especially on shared hosting. Each request requires PHP to parse XML, which is slower than JSON (used by the REST API). If your site receives many XML-RPC calls—for example, from a busy mobile app—it could increase CPU usage. Disabling it can slightly reduce server load, but the effect is usually negligible unless you are under attack.
Compatibility is the bigger concern. If you use any of the following, disabling XML-RPC will break them:
- The Jetpack plugin (many features)
- WordPress mobile apps (iOS/Android)
- Desktop editors like Windows Live Writer (though outdated)
- Third-party services that sync content (e.g., some SEO tools)
- The block editor's asynchronous requests in certain configurations
Before disabling, check if you actually rely on these. If you only use the web dashboard and have no connected apps, disabling is low-risk.
How to Disable XML-RPC (Methods and Trade-offs)
There are several ways to disable XML-RPC, each with different levels of permanence and control:
- Use a security plugin: Many security plugins (e.g., Wordfence, iThemes Security) have an option to disable XML-RPC. This is the easiest method for most users, as it provides a toggle and often comes with additional protection.
- Add code to your theme's functions.php: You can add a filter to return false for
xmlrpc_enabled. This disables the protocol entirely but is theme-dependent—if you switch themes, the code is lost. - Block access at the server level: Using an .htaccess rule (Apache) or a Nginx configuration, you can return a 403 Forbidden for requests to
xmlrpc.php. This is the most robust method, as it prevents any request from reaching WordPress. - Use a plugin specifically for this purpose: Plugins like "Disable XML-RPC" do exactly that, often with a simple on/off switch.
If you only want to block the risky system.multicall and pingback.ping methods while keeping other functionality, you can use a filter to remove those methods. This is a more nuanced approach that preserves compatibility.
Should You Disable It? A Balanced View
The answer depends on your specific situation:
- If you run a simple blog with no external apps: Disabling XML-RPC is reasonable. It reduces attack surface and has no downside for you.
- If you use Jetpack or mobile apps: Keep it enabled, but mitigate risks with strong authentication and a firewall.
- If you are on a low-resource shared host: Disabling might help during attacks, but it is not a substitute for proper security measures.
A common misconception is that XML-RPC is obsolete and can be safely disabled because the REST API exists. While the REST API is the modern replacement, XML-RPC is still deeply integrated into WordPress core and many plugins. Disabling it without checking dependencies can break functionality silently.
Alternatives and Best Practices
Instead of a binary on/off decision, consider these alternatives:
- Rate-limit requests: Use a firewall or plugin to limit the number of requests to
xmlrpc.phpper IP address. - Disable only dangerous methods: Remove
system.multicallandpingback.pingto prevent amplification attacks while keeping legitimate methods. - Use application passwords: WordPress 5.6 introduced application passwords, which are more secure than using your main password for API calls. They work with the REST API, not XML-RPC, so consider moving to REST-based integrations.
- Monitor logs: Check your server logs for suspicious XML-RPC traffic. If you see frequent failed authentication attempts, that is a sign to take action.
Ultimately, disabling XML-RPC is a security hardening step, but it is not a magic bullet. A layered approach—strong passwords, two-factor authentication, a firewall, and regular updates—is more effective than disabling a single feature.
Frequently Asked Questions
Will disabling XML-RPC break the block editor?
In most cases, no. The block editor primarily uses the REST API. However, if your site has a caching plugin that disables the REST API, the editor may fall back to XML-RPC for some operations. If you disable XML-RPC, you might see issues with the editor in that specific configuration. Test after disabling to be sure.
How do I check if XML-RPC is enabled on my site?
You can use a tool like cURL to send a simple POST request to yourdomain.com/xmlrpc.php with a valid XML-RPC method (e.g., system.listMethods). If you get an XML response, it is enabled. Many security plugins also show this status in their dashboard.
Can I disable XML-RPC without a plugin?
Yes. You can add add_filter('xmlrpc_enabled', '__return_false'); to your theme's functions.php file, or block access at the server level with .htaccess or Nginx rules. The plugin method is easier for non-technical users.
Does disabling XML-RPC affect SEO?
No. XML-RPC does not affect how search engines crawl or index your site. It is an API endpoint, not a page. Disabling it has no direct SEO impact.
Is XML-RPC the same as the REST API?
No. XML-RPC is an older protocol that uses XML, while the REST API uses JSON and is the modern standard. They serve similar purposes but are different implementations. WordPress supports both, but the REST API is the recommended choice for new integrations.
What should I do if my site is under a brute-force attack via XML-RPC?
Immediately disable XML-RPC temporarily, block the attacking IPs via your firewall, and change your passwords. After the attack subsides, you can re-enable it if needed, but consider keeping it disabled or using a plugin that limits requests.