WordPress

Should You Disable XML-RPC in WordPress? When Not To, and How

By , Lead SEO & Co-founder 6 min read
An old side port on a server rack at night sealed with a crimson-lit cover, an unused cable coiled and removed, the main ports glowing cyan and a laptop on a cart showing abstract status bars

The standard advice is to disable xmlrpc WordPress-wide with one line and move on, and for a lot of sites that's fine. But if you run Jetpack, publish from a phone app, or use a service that posts to your site remotely, that one line quietly breaks the connection, and nothing on your site tells you why.

So this guide starts with the question most posts skip: does anything you use actually need xmlrpc.php? Then it gives you three ways to lock it down, from "keep it but stop the password guessing" to "block it completely", with a one-line test for each. If you'd rather hand this off, the maintenance questionnaire takes a few minutes, and I reply with a plan and a fixed quote within one business day.

What xmlrpc.php is, and why bots love it

xmlrpc.php is an older remote-control door into WordPress. XML-RPC (a way for one program to call functions on another over the web) lets apps and services log in, publish posts, upload images and send pingbacks (automatic "I linked to you" notices between blogs). It came long before the REST API that newer tools use.

Bots love it for two reasons:

  • Password guessing away from the login page. Every XML-RPC call can carry a username and password. Some security setups watch wp-login.php closely and forget this door.
  • Pingback abuse. Attackers can ask thousands of WordPress sites to "ping" one victim at once, turning your site into a small part of someone else's traffic flood.

You may have read that one XML-RPC request can test hundreds of passwords. That was true in 2015, when Sucuri documented attackers using a method called system.multicall so that 3 or 4 requests could try thousands of passwords. WordPress fixed that trick in version 4.4: the current XML-RPC login code refuses every further login attempt in the same request once one fails. Ordinary one-guess-per-request attacks still happen all day, so the door still deserves a lock. It just isn't the fire hazard older posts describe.

When not to disable XML-RPC in WordPress

Check these before you block anything.

Jetpack. Jetpack's own support page says it plainly: "Jetpack, like other plugins, services, and mobile apps, relies on the XML-RPC file to communicate with WordPress.com. If this is blocked, your Jetpack connection will stop working properly." That takes down Jetpack stats, backups, downtime monitoring and anything else that runs through WordPress.com.

Mobile and desktop publishing apps. As Jetpack's page notes, mobile apps are on the list of things that can depend on XML-RPC. Some older desktop blogging tools only speak XML-RPC. If you or a team member publishes from a phone or an app, test it after any change.

Remote services that post to your site. Some automation tools, social schedulers and site management services connect through XML-RPC, others through the REST API with application passwords (separate, revocable passwords for apps). Check each tool's connection settings or docs.

Your host may have decided already. Jetpack's known issues list notes that Pantheon blocks xmlrpc.php by default, and that WP Engine blocks it on environments created after April 2022. If you're on one of those and Jetpack works, someone already made an exception.

If none of these apply, you're in the "block it" group, and the third method below is the simplest.

Check whether anything uses xmlrpc.php

Your server's access log shows every request to the file. On cPanel, you can download raw access logs from Metrics > Raw Access. With SSH:

Terminal
# Counts requests to xmlrpc.php by user agent (the name each client sends). Read-only.
# Replace the log path with yours. On cPanel it's often in ~/access-logs/.
grep "xmlrpc.php" /path/to/access.log | awk -F'"' '{print $6}' | sort | uniq -c | sort -rn | head -20

What to look for:

  • Jetpack by WordPress.com or requests with ?for=jetpack: Jetpack is using it
  • The name of a publishing app or service you recognize: something you use depends on it
  • A wall of identical generic agents from many IP addresses: that's the password guessing

Three ways to lock it down

Option 1: Keep XML-RPC, stop the logins (gentlest)

If Jetpack or an app needs the door but you want the guessing to stop, turn off the parts that matter. Wordfence has XML-RPC options in its Login Security settings, including disabling XML-RPC authentication or requiring two-factor login for it. My Wordfence settings guide covers the related login options.

Without a plugin, a small must-use plugin (a PHP file in wp-content/mu-plugins/ that WordPress always loads) does the same:

PHP
<?php
/**
 * Plugin Name: Limit XML-RPC
 * Description: Turns off XML-RPC methods that need a login, and removes pingbacks.
 * Could break: any app or service that logs in through XML-RPC. Test Jetpack and your apps after.
 */
add_filter( 'xmlrpc_enabled', '__return_false' );

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

Know what the first filter does and doesn't do. WordPress's reference for xmlrpc_enabled says it only controls methods that require authentication. It does not switch off pingbacks, which is why the second filter removes them separately. After adding it, check Jetpack's dashboard to confirm the site still shows as connected.

Option 2: Block it, but allow Jetpack's servers

This blocks everyone except the address ranges Jetpack publishes on its allowlist page, as of October 2026:

.htaccess / Apache
# Root .htaccess, above "# BEGIN WordPress". Apache 2.4 or LiteSpeed.
# Only Jetpack's published ranges can reach xmlrpc.php. Could break: mobile apps and any other
# service using XML-RPC, plus Jetpack itself if its ranges change. Behind Cloudflare, Apache sees
# Cloudflare's IPs unless mod_remoteip is set up, so this would block Jetpack too.
<Files "xmlrpc.php">
    Require ip 192.0.64.0/18
    Require ip 195.234.108.0/22
    Require ip 122.248.245.244/32
    Require ip 54.217.201.243/32
    Require ip 54.232.116.4/32
</Files>

The 192.0.64.0/18 range already includes the three 192.0.x.0/20 ranges Jetpack lists separately. Jetpack warns that its addresses can change and that you "should be able to protect a site's XML-RPC file without having to allow specific IP ranges", so treat this as the stricter option, and re-check the page now and then.

Option 3: Block it completely

For sites with no Jetpack, no app publishing and no remote services:

.htaccess / Apache
# Root .htaccess, above "# BEGIN WordPress". Refuses every request to xmlrpc.php.
# Could break: Jetpack, mobile publishing apps, pingbacks, and any remote publishing tool.
<Files "xmlrpc.php">
    Require all denied
</Files>

It's the same rule I include, commented out, in my copy-paste .htaccess rules for WordPress. If you use Cloudflare, a firewall rule there that blocks the path /xmlrpc.php does the same job before the request reaches your server at all.

Notice the syntax. Many guides still hand out order deny,allow / deny from all, which is Apache 2.2 style and can cause a 500 error after editing .htaccess on servers without the compatibility module.

Test it

Terminal
# Before blocking: prints the plain-text message "XML-RPC server accepts POST requests only."
curl -s https://example.com/xmlrpc.php

# After options 2 or 3: should print 403 from your own computer.
curl -s -o /dev/null -w "%{http_code}\n" -X POST https://example.com/xmlrpc.php

Then open Jetpack's dashboard and any app you publish from, and confirm they still connect.

Final thoughts

Should I disable XML-RPC? It's a fair question, and the honest answer is "probably, after a two-minute check". Look at the access log, list what connects to your site, and pick the gentlest option that covers your setup. A blocked door you needed is a worse problem than an open door you've locked properly.

If you'd like this checked along with updates, backups and security monitoring every month, that's what my monthly care for WordPress sites covers, starting at $250 a month.

Disable xmlrpc WordPress FAQs

Should I disable XML-RPC on my WordPress site?

If you don't use Jetpack, a mobile publishing app, or any service that posts to your site remotely, yes. Blocking it removes a door bots use for password guessing and pingback abuse. If you do use one of those, don't block it outright. Turn off XML-RPC logins or allow only Jetpack's servers instead, then test that everything still connects.

Does disabling XML-RPC break Jetpack?

Yes, if you block the file completely. Jetpack's support documentation says it relies on xmlrpc.php to communicate with WordPress.com, and that blocking it stops the connection from working properly. You can still limit it: turn off pingbacks and login methods with a small plugin, or allow only Jetpack's published IP ranges and block everyone else.

What is an xmlrpc.php attack?

Usually one of two things. Bots send login guesses to xmlrpc.php instead of the normal login page, hoping to dodge login protection. Or attackers abuse pingbacks to make many WordPress sites send requests to one victim at once. The old trick of packing hundreds of guesses into one request stopped working in WordPress 4.4.

Is it safe to delete xmlrpc.php?

Don't delete it. It's a WordPress core file, so the next update puts it back, and integrity scans will flag it as missing in the meantime. Blocking it in .htaccess, at your CDN, or with a plugin setting gives the same result and survives updates. It's also easy to undo if something you need turns out to depend on it.

Not sure which group your site is in? Send me the details and I'll check what connects to it before anything gets blocked.

Want a second pair of eyes on your site?

Tell me what's going on in the wordpress maintenance questionnaire. I reply with a plan and a fixed quote within one business day.

Starting at $250/mo Start the questionnaire