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.multicall method can bundle many login attempts into one request.
  • The pingback.ping method 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.

A person works on a laptop displaying website security settings at a minimalist desk.

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:

  1. Create a current backup of your files and database.
  2. Test the setting on a staging copy if your host provides one.
  3. Open the plugin’s firewall or hardening settings.
  4. Turn off XML-RPC access.
  5. 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.

We use cookies so you can have a great experience on our website. View more
Cookies settings
Accept
Decline
Privacy & Cookie policy
Privacy & Cookies policy
Cookie name Active

Who we are

Our website address is: https://zadic.net.

Comments

When visitors leave comments on the site we collect the data shown in the comments form, and also the visitor’s IP address and browser user agent string to help spam detection. An anonymized string created from your email address (also called a hash) may be provided to the Gravatar service to see if you are using it. The Gravatar service privacy policy is available here: https://automattic.com/privacy/. After approval of your comment, your profile picture is visible to the public in the context of your comment.

Media

If you upload images to the website, you should avoid uploading images with embedded location data (EXIF GPS) included. Visitors to the website can download and extract any location data from images on the website.

Cookies

If you leave a comment on our site you may opt-in to saving your name, email address and website in cookies. These are for your convenience so that you do not have to fill in your details again when you leave another comment. These cookies will last for one year. If you visit our login page, we will set a temporary cookie to determine if your browser accepts cookies. This cookie contains no personal data and is discarded when you close your browser. When you log in, we will also set up several cookies to save your login information and your screen display choices. Login cookies last for two days, and screen options cookies last for a year. If you select "Remember Me", your login will persist for two weeks. If you log out of your account, the login cookies will be removed. If you edit or publish an article, an additional cookie will be saved in your browser. This cookie includes no personal data and simply indicates the post ID of the article you just edited. It expires after 1 day.

Embedded content from other websites

Articles on this site may include embedded content (e.g. videos, images, articles, etc.). Embedded content from other websites behaves in the exact same way as if the visitor has visited the other website. These websites may collect data about you, use cookies, embed additional third-party tracking, and monitor your interaction with that embedded content, including tracking your interaction with the embedded content if you have an account and are logged in to that website.

Who we share your data with

If you request a password reset, your IP address will be included in the reset email.

How long we retain your data

If you leave a comment, the comment and its metadata are retained indefinitely. This is so we can recognize and approve any follow-up comments automatically instead of holding them in a moderation queue. For users that register on our website (if any), we also store the personal information they provide in their user profile. All users can see, edit, or delete their personal information at any time (except they cannot change their username). Website administrators can also see and edit that information.

What rights you have over your data

If you have an account on this site, or have left comments, you can request to receive an exported file of the personal data we hold about you, including any data you have provided to us. You can also request that we erase any personal data we hold about you. This does not include any data we are obliged to keep for administrative, legal, or security purposes.

Where your data is sent

Visitor comments may be checked through an automated spam detection service.
Save settings
Cookies settings