A public xmlrpc.php endpoint can give attackers another way into your WordPress site. If you searched for disable XML-RPC WordPress, you’re probably looking for a practical security step that won’t break your website.
The safest way to disable XML-RPC WordPress depends on how your site works. We’ll show you what XML-RPC does, when blocking it makes sense, which method to choose, and how to test the change before you walk away.
What XML-RPC Does in WordPress
XML-RPC is an older WordPress interface that lets external applications communicate with your website. It can support remote publishing, mobile apps, third-party integrations, and some plugin connections without requiring you to open the WordPress dashboard.
That sounds useful. The problem is the same public endpoint can be abused.
Attackers commonly target xmlrpc.php for two reasons:
- The
system.multicallmethod can bundle many login attempts into one request. - The
pingback.pingmethod can help create reflection attacks that send unwanted traffic toward another website.
A normal login page may have rate limits, CAPTCHA checks, or two-factor authentication. XML-RPC requests can sometimes avoid those protections because they use a separate pathway. Attackers may also target methods such as wp.getUsersBlogs to test stolen usernames and passwords.
XML-RPC isn’t automatically a security flaw. If your site needs it, you can keep it enabled and protect it properly. If you don’t use remote publishing or related integrations, leaving the endpoint open creates risk without giving you much value.
The WordPress VIP XML-RPC security controls documentation also treats disabling the endpoint as a common security measure for sites that don’t need remote access.

Should You Disable XML-RPC WordPress Access?
Before blocking anything, check whether your site depends on XML-RPC. A security change is only helpful when it doesn’t remove a feature your business needs.
You may need XML-RPC if you:
- Publish posts through an older mobile app or desktop publishing tool.
- Use a plugin that connects to WordPress through XML-RPC.
- Rely on a third-party service that clearly lists XML-RPC as a requirement.
- Use remote publishing features that don’t work through the WordPress REST API.
You probably don’t need it if you manage content through wp-admin, use current WordPress tools, and don’t have a known integration connected to the endpoint.
We recommend checking your plugins before making the change. Look through plugin settings, support documentation, and your hosting security logs. If a service has been installed for years and nobody knows what it does, test the site on staging first.
There’s also a middle option. Instead of blocking the entire endpoint, you can disable certain features, such as pingbacks, while keeping remote access available. That reduces some abuse without fully removing XML-RPC. It doesn’t provide the same protection as blocking xmlrpc.php, though.
If your website only needs the WordPress dashboard, XML-RPC is often an unused public entrance. Closing an unused entrance is easier than defending it forever.
Sucuri’s explanation of XML-RPC security risks covers the main concern: attackers can use the endpoint for brute-force activity and pingback abuse.
How to Disable XML-RPC WordPress Safely
We have three practical options. The best choice depends on your technical comfort, hosting setup, and whether you need a quick reversible change.
Use a Security Plugin
For most site owners, a reputable WordPress security plugin is the easiest route. Look for a plugin that includes a clear setting to disable XML-RPC rather than one that adds a large collection of unrelated changes.
The process usually looks like this:
- Create a current backup of your files and database.
- Test the setting on a staging copy if your host provides one.
- Open the plugin’s firewall or hardening settings.
- Turn off XML-RPC access.
- Save the setting and test your website.
A plugin-based change is easy to reverse. That matters if Jetpack, a mobile app, or another integration stops working after the update.
Choose a maintained plugin from a trusted developer. Check its recent updates, WordPress compatibility, support activity, and user reviews. Avoid installing several security plugins that all modify the same endpoint. They can conflict and make troubleshooting harder.
This approach may block XML-RPC through WordPress or add a server rule, depending on the plugin. Read the setting description before you enable it. Some plugins only disable authenticated XML-RPC methods, while others block the endpoint completely.
Add a WordPress Filter
Developers can disable authenticated XML-RPC methods with a small WordPress filter. Add the following code to a custom functionality plugin or a must-use plugin:
add_filter( 'xmlrpc_enabled', '__return_false' );
Don’t place this in a theme’s functions.php file unless you understand the tradeoff. The code disappears when you change or replace the theme. A small custom plugin is a better long-term home.
There’s an important limitation here. The xmlrpc_enabled filter disables methods that require authentication, but it may not block every XML-RPC request. Pingbacks and other unauthenticated behavior may still need separate controls.
That means this method is useful, but it isn’t always a complete block. If your goal is to stop all public requests to xmlrpc.php, use a web server or firewall rule instead.
Block the Endpoint at the Server or Firewall
A server-level block stops requests before WordPress has to process them. That can reduce wasted server work and block unwanted traffic earlier.
On Apache hosting, a qualified administrator can add an access rule for xmlrpc.php. On Nginx, the equivalent is usually a location rule that denies access to that exact file. The syntax depends on your server version and configuration, so don’t paste random rules into .htaccess.
You can also create a firewall rule through a provider such as Cloudflare. A rule that blocks requests to the path /xmlrpc.php can prevent the traffic from reaching your hosting account.
This is often the strongest option for a site that has no XML-RPC dependency. It also avoids relying on a WordPress plugin to load before the unwanted request is rejected.
If your site uses cPanel hosting, ask your hosting provider for help before editing server files. A bad .htaccess rule can produce a 500 error or block more than intended. With managed hosting, support can check the configuration, apply the rule safely, and help restore access if an integration breaks.
Providers such as ZADiC focus on managed WordPress and hosting support for site owners who don’t want every security task to become a server project. Hosting with SSL, monitoring, backups, and human support gives you a safer place to make changes like this.
How to Check That XML-RPC Is Disabled
Don’t assume the change worked because the plugin says it did. Test the actual endpoint.
Open https://yourdomain.com/xmlrpc.php in a browser, replacing yourdomain.com with your domain. An enabled endpoint often responds with a message that says the XML-RPC server accepts POST requests only. A blocked endpoint may return a 403 or 404 response, depending on the rule.
You can also ask your hosting provider to check the access logs. Look for recent requests to /xmlrpc.php and confirm that the server is denying them.
Then test the parts of your website that matter:
- Log in to the WordPress dashboard.
- Publish and update a post.
- Submit a contact form.
- Check connected plugins and marketing tools.
- Confirm that scheduled tasks and backups still run.
- Test any mobile or remote publishing app you use.
A security scanner can provide another check. Wallarm’s guide to XML-RPC attack protection explains how exposed XML-RPC endpoints can be identified and protected.
If your site still responds to XML-RPC after a WordPress filter is added, that doesn’t necessarily mean the code failed. It may only have disabled authenticated methods. Use a server or firewall block when you need the endpoint closed completely.
What to Do If Your Site Needs XML-RPC
Some websites need XML-RPC for a specific integration. In that case, don’t disable it without checking what will stop working.
Start by updating WordPress, plugins, themes, and your PHP version. Use HTTPS across the site so credentials and other traffic are encrypted in transit. Turn off pingbacks if you don’t need them, and restrict access to known services when your firewall supports allowlists.
Strong account security still matters. Use unique passwords, administrator two-factor authentication, limited user permissions, regular backups, and login monitoring. XML-RPC protection should support those measures, not replace them.
Review your logs after enabling XML-RPC. A sudden increase in requests to xmlrpc.php, repeated login failures, or unusual pingback activity deserves attention. Invicti’s overview of IP disclosure attacks provides more context on how XML-RPC can expose information during certain attacks.
Final Thoughts
For a WordPress site that doesn’t use remote publishing, disabling xmlrpc.php is a sensible security improvement. A plugin is convenient, a WordPress filter is flexible, and a server or firewall block offers the clearest full shutdown.
Back up first, test the change, and confirm that your important integrations still work. The right hosting setup can make that process easier, with security monitoring, SSL, backups, and support available when a technical setting needs more than a quick click.
A small unused endpoint shouldn’t create a large security headache. Close it when you don’t need it, protect it carefully when you do, and keep your website ready for growth.





