Skip to content
FunnelGuard

Fix guide by FunnelsGuard

XML-RPC enabled and abused on WordPress: how to find and fix it

OPS-168Low impactOther toolBy FunnelGuardPublished Updated
On this page

What this issue is

XML-RPC is an old way for other software to talk to WordPress. It lives in one file, xmlrpc.php, in the site root. It lets apps publish posts, read comments or log in from outside the dashboard. Today the REST API does most of this work, but the file is still switched on by default.

The problem is how attackers use it. The system.multicall method lets one request carry many login attempts, so a bot can test hundreds of passwords while you see a single hit in the logs. The pingback.ping method can also be used to make your server send requests to other sites, which helps in denial-of-service floods.

Why it costs you leads or sales

A successful break-in can let an attacker change forms, redirect visitors or inject spam. Even a failed attack uses server resources. A flood of requests to xmlrpc.php can slow pages or take the site down, and visitors who hit a slow or broken page leave before they fill in a form or buy.

How XML-RPC abuse reaches your sales
  1. Bot finds /xmlrpc.phpFile is open to anyone
  2. Bulk login guessesMany passwords per request
  3. Server overloadedPages load slowly or time out
  4. Visitor leavesForm or checkout never used

A bot floods xmlrpc.php, the server slows down, and visitors never reach the form.

How to check if your site has it

Check whether xmlrpc.php is open
  1. Open the file in a browser

    Go to https://yourdomain.com/xmlrpc.php. The message 'XML-RPC server accepts POST requests only.' means the file is active. A 403, 404 or blocked page means it is already closed.

  2. Test with a request

    Run the command below. If the reply lists method names, XML-RPC is answering requests.

  3. Look at your server logs

    Search access logs for repeated POST requests to /xmlrpc.php from the same few IP addresses. Many of them point to abuse.

List the methods XML-RPC exposesbash
curl -s -X POST https://yourdomain.com/xmlrpc.php \
  -H 'Content-Type: text/xml' \
  -d '<?xml version="1.0"?><methodCall><methodName>system.listMethods</methodName></methodCall>'

How to fix it

First decide if you need it. Jetpack, some older mobile apps and a few publishing tools rely on XML-RPC. If you do not use any of them, block it completely. If you do, limit access instead of leaving it open to everyone.

Block XML-RPC by platform
  1. Use a security plugin setting

    Many security plugins have a toggle to disable XML-RPC. Look for it in the plugin's settings and switch it on. Check the exact name in your plugin.

  2. Or add a filter

    Add add_filter( 'xmlrpc_enabled', '__return_false' ); to a small custom plugin or your child theme's functions.php. This stops method calls but the file still answers, so a server-level block is stronger.

Apache: deny all access to xmlrpc.phphtaccess
<Files xmlrpc.php>
  Require all denied
</Files>
Nginx: return 403 for xmlrpc.phpnginx
location = /xmlrpc.php {
    deny all;
}

How to confirm it's fixed

Open https://yourdomain.com/xmlrpc.php again and run the curl command from earlier. You should get a 403, 404 or an error, and no list of methods. Then check that your forms, checkout and any connected apps still work.

After the change
  • xmlrpc.php returns 403 or 404 (or is limited to trusted IPs)
  • system.listMethods no longer returns a method list
  • Jetpack or other tools you use still work, or you have a replacement
  • Logs show fewer POST requests to /xmlrpc.php
  • Site speed is normal during the next few days

How to prevent it happening again

Keep it closed
  • Keep the block rule in your server config, not only in a plugin
  • Use strong, unique admin passwords and two-factor login
  • Limit login attempts with a firewall or security plugin
  • Keep WordPress core and plugins updated
  • Review server logs now and then for repeated requests to xmlrpc.php
  • Re-check the rule after a migration or a server change

How FunnelGuard handles this

This issue is outside what FunnelGuard checks. FunnelGuard runs robot visits through your lead forms, checkouts and tracking, and it does not test server security settings like xmlrpc.php. For this you need a different kind of tool: a web application firewall (WAF), a WordPress security scanner, or a vulnerability scanner that probes your site for exposed endpoints.

What FunnelGuard can help with is the side effect you care about, such as whether your forms and checkout still work after you change server rules. You can start with the Free plan: 1 site, 2 journeys, daily checks, no card needed.

Questions people ask

What is xmlrpc.php in WordPress?

It is a file that lets outside apps talk to WordPress, for example to publish posts or log in remotely. It is an older method that the REST API has largely replaced, but it is still switched on by default.

Is it safe to leave XML-RPC enabled?

Usually not, unless you need it. Attackers use it to try many passwords in a single request and to launch pingback floods. If nothing on your site relies on it, block it.

How do I disable XML-RPC in WordPress?

The most reliable way is to block /xmlrpc.php in your server config, using a Files rule in .htaccess on Apache or a location block on nginx. You can also use a security plugin toggle or the xmlrpc_enabled filter, though those leave the file answering requests.

Will disabling XML-RPC break my site?

Not for most sites. It can break Jetpack, older mobile apps and some publishing tools that depend on it. Test those after the change, and allow only trusted IPs if you need it.

Why am I seeing lots of POST requests to xmlrpc.php in my logs?

This is a typical sign of bots guessing passwords or sending pingback requests. Block or rate limit the file and check your admin accounts for weak passwords.

How can I tell if my xmlrpc.php is open?

Visit yourdomain.com/xmlrpc.php. If it says 'XML-RPC server accepts POST requests only', it is active. A 403 or 404 means it is blocked.

Does FunnelGuard check for XML-RPC?

No. This is a server security issue, so you need a web application firewall or a security scanner. FunnelGuard checks your forms, checkouts and tracking instead.

Does FunnelGuard catch this?

Other tool

Needs a different kind of tool.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.