Should you disable XML-RPC in WordPress? The answer mostly depends on your integrations. If no tool uses it, blocking access to xmlrpc.php reduces an unnecessary attack surface. However, disabling it too quickly can break a mobile app, a publishing service, or an older connector.
To secure WordPress XML-RPC without causing outages, start by checking actual usage. Then choose the narrowest measure that meets your need: full blocking, disabling authentication, or removing specific methods.
XML-RPC: what is this entry point still used for?
XML-RPC is an interface that allows external software to communicate with WordPress via requests sent to /xmlrpc.php. The WordPress XML-RPC server includes methods related to posts, pages, comments, and pingbacks. The official reference also describes compatibility with legacy APIs, including Blogger, MetaWeblog, and MovableType.
Do not confuse XML-RPC with the XML sitemap. A sitemap helps search engines discover your URLs. XML-RPC, by contrast, receives requests from software. You can therefore block XML-RPC without removing your sitemap; if needed, consult the guide for check and fix the WordPress XML sitemap.
The file xmlrpc.php remains accessible in a standard WordPress installation. That does not prove an integration depends on it. However, this entry point can receive repeated authentication attempts. It therefore deserves the same attention as your other administrative access points, including the measures presented for protecting WordPress against brute force attacks.
Choosing between blocking, limiting, and keeping it enabled
The right decision is not to apply a universal setting. It is rather to match protection to the functions actually required.
| Observed situation | Prudent choice |
|---|---|
No legitimate requests to xmlrpc.php and no known tool uses it | Completely block access to the URL at the server or the web application firewall. |
| A tool must publish or manage content remotely via XML-RPC | Keep XML-RPC, but reduce unnecessary methods and protect access. |
| You want to prevent XML-RPC logins while retaining other functions | Disable only the methods that require authentication. |
| Pingbacks are not useful, but an XML-RPC integration is still required | Remove only the pingback methods. |
In practice, full blocking works well for a brochure or editorial site with no external publishing. Conversely, targeted limitation is better when a service still depends on this interface.
Check dependencies before making any changes
Prepare a reliable rollback
Before changing a server rule, a firewall, or code, create a full backup. Above all, make sure it includes the files and the database. A backup exists to roll back, but it must also be restorable.
Ideally, apply the change first in a test environment. This lets you verify administration, forms, and integrations without touching the public site. If needed, follow the steps to create a WordPress staging environment before making changes.
Identify real calls
Check the access logs of your hosting, your server, or your firewall. Look for requests to /xmlrpc.php, then note their frequency, source address, and timing. A single unknown request doesn’t prove a service is required. However, regular traffic from an identified provider deserves investigation.
Next, list your tools that publish, upload media, or synchronize content. Check their documentation and settings. If a provider can’t confirm its protocol, run a controlled test rather than leaving XML-RPC open as a precaution.
Test the critical workflow
After each change, test the function that justifies XML-RPC. For example, publish a draft from the concerned tool, upload a media item, or run a non-destructive sync. Also check the logs: a clear error after blocking often confirms the dependency.
Finally, keep a note indicating the rule applied, the allowed integration, and the responsible person. This information speeds diagnosis during a plugin or hosting change.
Three ways to secure WordPress XML-RPC
1. Block completely xmlrpc.php
Complete blocking refuses requests to /xmlrpc.php before they reach WordPress. You can implement it in the server configuration, at the host, or with an application firewall. An HTTP response code 403 is often used to signal this refusal.
This option is the easiest to manage when you’ve confirmed there are no dependencies. However, it will break any integration that uses XML-RPC, even if that integration uses only a single method.
2. Disable methods that require authentication only
WordPress provides the filter xmlrpc_enabled. Despite its name, it does not completely turn off XML-RPC. Official documentation states it only disables methods that require authentication, such as publishing methods. Pingbacks and custom endpoints that don’t require authentication are not affected.
In a dedicated plugin, a developer can use this filter to return the false value. The xmlrpc_enabled documentation provides an implementation example. Then test publishing from the remote tool to confirm this restriction works.
This approach is suitable if you want to prevent XML-RPC connections without automatically blocking all functions exposed by the file. It therefore does not replace full blocking when that is your goal.
3. Remove individual XML-RPC methods only
For finer-grained protection, WordPress exposes the xmlrpc_methods filter. It lets you remove specific methods. To disable pingbacks, have your developer remove pingback.ping and pingback.extensions.getPingbacks for you. They should keep the other methods needed for your integrations.
This approach preserves other methods required by your integration. However, test it carefully. A plugin may rely on a less obvious method, and an overly restrictive list can disrupt a useful workflow.
Lowering risk when an integration must remain active
If XML-RPC is still required, first limit the privileges of the account used by the integration. Avoid using an administrator account to publish posts or upload media. WordPress roles should match the tasks actually needed.
Also use a separate application password when the tool supports it. WordPress presents application passwords as revocable credentials tied to a specific application for programmatic access. They can be used with the REST API and, when XML-RPC is enabled, with XML-RPC. For proper creation and revocation, see secure use of WordPress application passwords.
Also ask your host or technical team to limit abnormal requests to /xmlrpc.php. A firewall rule can target that URL, apply rate limiting and, if the integration has stable addresses, restrict access to authorized sources. Only allow an IP address if the provider confirms it is static and documented.
WordPress documentation states that the xmlrpc_methods filter affects the exposed methods. It also confirms the server understands pingback methods. These details justify a targeted approach rather than a supposedly complete but incomplete setting.
The safest decision is the one you can verify
If XML-RPC has no demonstrated use, block it entirely. If an integration depends on it, keep only what’s necessary, reduce permissions and monitor requests. That way you secure WordPress XML-RPC without turning a protective measure into a service outage.
To go further with a targeted technical review or maintenance resources, you can consult my online store.
Technical references: the official WordPress XML-RPC server class describes the families of supported methods; the documentation for the xmlrpc_enabled filter explains its precisely limited scope; the xmlrpc_methods filter allows removing methods; and finally, the official guide on application passwords detail their use for programmatic access.









