WordPress Security ServicesMalware Removal
Scan Findings Explained

"XML-RPC Enabled" on WordPress: What It Means and Whether to Disable xmlrpc.php

"XML-RPC is enabled" shows up in many WordPress security scans, and xmlrpc.php shows up in almost every attack log I look at. It's an old remote-access interface that most sites no longer need. Here's what it does, why attackers like it, and how to turn it off without breaking anything you use.

Sergey By Sergey, WordPress security specialist Updated 2 min read
In this guide
  1. What XML-RPC is
  2. Why attackers like it
  3. Do you need it?
  4. How to disable it

What XML-RPC is

xmlrpc.php lets other programs talk to your WordPress site remotely: publish posts from a desktop app, receive pingbacks from other blogs, or connect services like Jetpack. It dates from long before WordPress had its modern REST API.

Why attackers like it

  • Faster password guessing. XML-RPC can accept many login attempts in a single request, which can make brute-force attacks more efficient and harder for simple login limiters to notice.
  • Pingback abuse. The pingback feature can be used to make your site send requests to other sites, for example as part of an attack on someone else.
  • Noise. Constant requests to xmlrpc.php use server resources, even when they fail.

Do you need it?

You probably don’t, unless you use:

  • Jetpack, which uses XML-RPC to connect to WordPress.com;
  • an older mobile or desktop app to publish posts;
  • a service that publishes to your site remotely using XML-RPC.

How to disable it

Block the file (Apache)

The most complete option. Add to your root .htaccess:

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

On Nginx, ask your host to deny access to /xmlrpc.php.

With a security plugin

Wordfence, Solid Security, AIOS and others have a setting to disable XML-RPC or its authentication methods.

With Cloudflare

If your site is behind Cloudflare, a single firewall rule can block /xmlrpc.php before the request reaches your server. See Cloudflare firewall rules for WordPress.

A note on the xmlrpc_enabled filter

You’ll often see add_filter( 'xmlrpc_enabled', '__return_false' ); recommended. It turns off the XML-RPC methods that require logging in, but not everything (pingbacks, for example). Blocking the file is more thorough.

From my cleanup work: when I read access logs on a hacked site, xmlrpc.php is nearly always among the most requested files, thousands of times a day, almost all of it bots. It’s rarely the way in on its own. But blocking it removes a lot of noise, makes the real attack easier to spot, and closes one door for good.

Sergey, WordPress Security Specialist
About the author
Sergey, WordPress Security Specialist

10 years in WordPress security and incident investigation, and more than 200 websites cleaned of malware. Top Rated on Upwork with a 100% Job Success score. More about me

Frequently Asked Questions

Will disabling XML-RPC break my site?

For most sites, no. It can affect the Jetpack plugin, some older mobile or desktop publishing apps, and services that post to your site remotely. Check whether you use any of these first, and test after disabling it.

Is the REST API the same thing?

No. The REST API (/wp-json/) is the modern interface that the block editor and many plugins rely on. Don't disable it entirely. XML-RPC is the older interface that most sites can live without.

Is XML-RPC a vulnerability?

Not in itself; it's a feature. The risk is that it gives attackers an efficient way to guess passwords and abuse pingbacks. Strong passwords and two-factor login reduce the password risk; disabling XML-RPC removes it.

Need a hand?

Let me clean your WordPress site for you

Send me your site URL and what you're seeing. I'll reply with what I think is going on and the next step.

$95 per infected site · 1-month guarantee · direct contact with the specialist

Get My Site Cleaned →