WordPress XML-RPC: What It Does and How to Disable It

WordPress XML-RPC lets external apps publish and manage your site through xmlrpc.php. If none of your integrations needs it, you can block that endpoint to reduce unwanted traffic and password-guessing attempts.

However, Jetpack dependencies matter: a blanket block can disconnect services you use. Start by identifying those connections, then choose a plugin restriction or a full server-level block.

Key Takeaways

  • Block XML-RPC completely when nothing on your site needs it.
  • The xmlrpc_enabled filter disables authenticated methods, but it doesn’t block the entire endpoint.
  • Test remote publishing and Jetpack connections after every change, and keep a rollback available.

What WordPress XML-RPC Does

XML-RPC stands for Extensible Markup Language Remote Procedure Call. It sends XML messages over HTTP, allowing another application to request actions on your WordPress site.

Those actions include publishing posts, uploading media, editing content, and managing comments. WordPress has enabled XML-RPC by default since version 3.5.

The WordPress REST API now handles many remote connections using JSON instead of XML. It also powers the block editor, so disabling XML-RPC doesn’t mean disabling remote access altogether.

Your next step depends on what connects to your site.

Your setup Recommended approach
Dashboard-only publishing Block XML-RPC completely.
Official WordPress iOS or Android app Modern connections use REST; test your account’s connection after blocking.
Jetpack Preserve its required connection or use a platform-managed exception.
Legacy desktop publishing client Keep access restricted until you replace the client.
Incoming pingbacks Keep the necessary methods, or disable pingbacks deliberately.

Modern publishing tools generally use REST, but older clients and some WordPress.com connection paths can still depend on XML-RPC.

A full block stops any XML-RPC-dependent service. Review Jetpack’s XML-RPC requirements before applying one, because Jetpack also uses this endpoint.

Why XML-RPC Attracts Security Attacks

A data center aisle at night with a single server rack and glowing lines of light.

Password guessing through remote methods

The exposed endpoint creates another attack vector and adds security risks. Attackers can submit authentication attempts to xmlrpc.php without visiting your login page.

The system.multicall method bundles multiple calls into one HTTP request. Historically, attackers used it to submit hundreds of credential guesses while bypassing limits that counted requests.

Modern WordPress stops further authentication attempts within a request after a failure, so that older amplification behavior doesn’t apply unchanged. Nevertheless, ordinary XML-RPC brute force attacks remain possible.

Zscaler documented Win32.Backdoor.WPbrutebot, malware that used the wp.getUsersBlogs method through xmlrpc.php for password-guessing attempts.

Pingbacks can generate reflected traffic

Pingbacks let one site notify another that it has linked to its content. Attackers can abuse pingback.ping by persuading many WordPress sites to request a target URL.

Requests from many sites can enable DDoS attacks against a target by generating reflected traffic. That reflected traffic can reach the target without anyone signing in.

Disabling authenticated XML-RPC methods doesn’t automatically remove that notification feature. Those controls address different parts of the endpoint.

Disable XML-RPC Methods With a Custom Plugin

Back up your site first and keep SFTP or hosting file-manager access available. A custom plugin keeps this change independent of your theme. Parent-theme updates can overwrite edits to functions.php, and switching themes stops that theme’s code.

Turn off authenticated methods

Create wp-content/plugins/disable-xmlrpc.php and add:

<?php
/*
Plugin Name: XML-RPC Restrictions
*/
add_filter( 'xmlrpc_enabled', '__return_false' );

Next, open Plugins > Installed Plugins and activate XML-RPC Restrictions.

This disables methods that require authentication, including remote publishing. However, WordPress’s filter documentation explicitly distinguishes this from disabling XML-RPC entirely.

Our collection of WordPress code snippets includes this filter alongside other practical customizations.

Remove pingback methods too

To remove incoming notification methods, append this code to the same file, without adding another opening PHP tag:

add_filter( 'xmlrpc_methods', function ( $methods ) {
    unset(
        $methods['pingback.ping'],
        $methods['pingback.extensions.getPingbacks']
    );
    return $methods;
} );

Public utility methods can remain reachable afterward. For example, system.listMethods may still return a response.

If you want every request to xmlrpc.php rejected before WordPress processes it, use a server or firewall rule instead. Avoid stacking several disabling plugins, because overlapping controls make troubleshooting harder.

Block xmlrpc.php in Apache or Nginx

A metal security gate stands in a server room with glowing fiber-optic cables and a server rack.

Use the configuration for your actual web server. Nginx doesn’t read .htaccess, even when that file exists in your WordPress directory.

Apache: edit .htaccess outside WordPress’s markers

Enable hidden-file visibility and download a backup of .htaccess, usually beside wp-config.php.

For Apache 2.4, add this outside the # BEGIN WordPress and # END WordPress markers:

<Files "xmlrpc.php">
    Require all denied
</Files>

Apache 2.2 uses older authorization syntax:

<Files "xmlrpc.php">
    Order Deny,Allow
    Deny from all
</Files>

Use the block matching your server, rather than combining both. Version 2.2 is obsolete, so treat that configuration as legacy guidance.

These rules target xmlrpc.php without changing WordPress’s permalink routing. If saving produces a site-wide 500 error, restore your backup immediately.

Nginx: add an exact-match location

Inside your site’s existing server block, add:

location = /xmlrpc.php {
    deny all;
}

If WordPress lives under /blog/, use location = /blog/xmlrpc.php instead.

Test the configuration before reloading:

sudo nginx -t

Only after a successful test, reload Nginx:

sudo systemctl reload nginx

If managed hosting doesn’t give you server-configuration access, have its support team apply the exact-match block. Keep xmlrpc.php itself intact, because core updates can replace deleted WordPress files.

Restrict XML-RPC When You Still Need It

When a client requires XML-RPC, use an Elevated Security approach that restricts access rather than leaving it unrestricted. A stable-IP integration can use an allowlist; otherwise, apply XML-RPC-aware rate limiting and dedicated application passwords.

Application passwords are individually revocable credentials for integrations. Use HTTPS and a dedicated account with only the permissions the integration needs. Ordinary login-page two-factor authentication doesn’t automatically protect XML-RPC requests.

WordPress VIP provides a concrete rate-limiting example. Its XML-RPC protection blocks an IP for one hour after more than 10 requests within 30 seconds. That threshold is a VIP policy, not a WordPress core default.

VIP’s default authentication permits only application passwords. Its Baseline option also permits user credentials for accounts without two-factor authentication.

On VIP, its managed XML-RPC security control preserves Jetpack Search, uptime monitoring, and sync. Generic code or server blocks don’t provide that exception and can break Jetpack’s connection.

A web application firewall (WAF), such as Sucuri Website Firewall, can filter harmful XML-RPC traffic and offers an XML-RPC blocking option. Choose either selective protection or a full block according to your dependencies.

Verify the Block and Test Your Integrations

Test both the HTTP response and POST requests

Replace the example domain with your site’s address:

curl -I https://example.com/xmlrpc.php

Use these results as your first verification checklist:

  • A 403 Forbidden or deliberate 404 Not Found matches a full-block configuration.
  • A redirect requires testing the destination before drawing conclusions.
  • A 500 response indicates a configuration problem, not a successful security change.

Open the endpoint in a browser to inspect its response body. The message “XML-RPC server accepts POST requests only.” means it’s still reachable, usually with HTTP 405.

Then send a harmless POST request:

curl -i -H 'Content-Type: text/xml' 
  --data '<methodCall><methodName>system.listMethods</methodName><params/></methodCall>' 
  https://example.com/xmlrpc.php

A full server-level block should reject this too. An HTTP 200 XML response means the endpoint processed the request. After plugin-only restrictions, that can be expected; inspect whether those methods remain listed.

Exercise real integrations and retain a rollback

Publish or update a test draft through your mobile app or publishing client. Also test media uploads and run Jetpack’s connection diagnostic if you use it.

Review server logs for the endpoint’s requests and any newly rejected integration traffic. Test the dashboard editor too, because an overly broad firewall rule might accidentally affect REST requests.

If something breaks, remove only the rule or deactivate only the plugin you added. Retest the failing action, then replace the blanket block with a narrower restriction. Avoid turning off your entire firewall.

Frequently Asked Questions

Does disabling pingbacks in Settings disable XML-RPC?

No. Under Settings > Discussion, clearing “Allow link notifications from other blogs (pingbacks and trackbacks) on new posts” changes the default for new posts.

Existing posts can retain their previous setting. It also doesn’t remove the XML-RPC endpoint or its methods. Use method filtering or a full block when that’s your goal.

Should you disable the REST API too?

No. The block editor and many plugins need it. Public content can be readable without authentication, while protected operations require appropriate authentication and permissions.

Blocking XML-RPC doesn’t require blocking /wp-json/.

Is WordPress secure if XML-RPC stays enabled?

An enabled endpoint alone doesn’t mean your site is compromised. Keep WordPress and plugins updated, protect accounts, and rate-limit every authentication route you expose.

If nothing needs XML-RPC, blocking it removes an unnecessary route.

Choose the Smallest Access Your Site Needs

Restricting XML-RPC is one practical WordPress security measure, but it doesn’t replace broader site protection. You can disable XML-RPC safely when no integration depends on it, including remote publishing tools.

A server-level block rejects the whole endpoint, while plugin filters restrict selected functionality. If remote publishing is required, plugin filters can preserve that access. Keep the change reversible and test actual publishing workflows afterward. Before you disable XML-RPC, confirm required connections still work and block access your site doesn’t need.

Picture of Andy Feliciotti

Andy Feliciotti

Andy has been a full time WordPress developer for over 15 years. Through his years of experience has built 100s of sites and learned plenty of tricks along the way. Found this article helpful? Buy Me A Coffee

Leave a Reply

Your email address will not be published. Required fields are marked *

WordPress Tips Monthly
Get the latest from SmartWP to your inbox.