🚫
Security

xmlrpc.php: should you disable it, and how to do it safely

19.11.2026
← All articles

Every WordPress site has a file called xmlrpc.php in its root, and most owners have no idea what it does. Yet the server logs often show hundreds or thousands of requests to it every day. So should you disable it, is it safe, and what breaks if you do? The answer depends on which services your site relies on, so start by understanding what the file is for.

What XML-RPC was built for

XML-RPC is an old interface for connecting to WordPress from outside. Long before the REST API, it let people publish from desktop or mobile apps, receive pingbacks from other blogs and connect certain external services. Today the REST API covers most of this, but some plugins, Jetpack being the best-known, may still use XML-RPC for their connection, as do a few older integrations and publishing tools.

Before changing anything, make a short inventory. Look at the list of active plugins, ask whoever publishes content which tools they use, and check whether any external service such as a CRM or an automation platform posts to the site. If the answer to all of these is "only the dashboard", XML-RPC can be closed with no side effects. If something does depend on it, the partial approach described below keeps it working while removing the most abused features.

Why attackers love it

The system.multicall method runs many commands in one request, so an attacker can test hundreds of username and password pairs in a single HTTP call. Defences that count login attempts may not notice, because the logs show only one request. Pingbacks are the second problem: attackers send fake pingbacks to thousands of WordPress sites at once, each site fetches the target URL, and your server becomes part of an attack on someone else while burning its own resources.

Example: a local news site in Fergana

A small news site in Fergana, example.uz, has three editors who write only in the browser dashboard and use neither Jetpack nor external apps. One afternoon the site slowed to a crawl, and the logs showed thousands of POST requests per hour to xmlrpc.php. Since nobody needed XML-RPC, the developer blocked it at the server level. Requests were rejected before reaching PHP, the load dropped, and the editors noticed no change at all.

Is it enabled, and is it under attack?

Opening the file in a browser usually shows XML-RPC server accepts POST requests only.. To list the available methods:

curl -s -X POST -H "Content-Type: text/xml" \
  -d '<?xml version="1.0"?><methodCall><methodName>system.listMethods</methodName></methodCall>' \
  https://example.uz/xmlrpc.php

Then check the logs:

grep -c "POST /xmlrpc.php" access.log
grep "POST /xmlrpc.php" access.log | awk '{print $1}' | sort | uniq -c | sort -rn | head

Blocking XML-RPC completely

If nothing on your site needs it, deny access at the web server so WordPress never loads. In Apache .htaccess:

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

In Nginx:

location = /xmlrpc.php {
    deny all;
}

Repeat the curl test and expect 403 Forbidden. Do not delete the file itself; a WordPress update will bring it back.

If you need XML-RPC: remove only the risky parts

When Jetpack or another service depends on it, disable the pingback methods instead with a small file in wp-content/mu-plugins/:

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

Note that the popular xmlrpc_enabled filter only disables methods that require authentication; pingbacks keep working, so it is not full protection. Strong passwords, 2FA and login limits should cover XML-RPC as well. On sayt.uz hosting you can edit these files in the ISPmanager file manager opened from your cabinet; check your plugins still work after the change.

Related articles

🔑 Password Policy for Website Users: Modern Rules That Work 🚫 Your IP Is Blacklisted: How to Get Delisted from Spamhaus 🔐 Hiding and protecting your admin panel: a layered approach 🛡️ Protecting wp-login.php from brute-force attacks
🌐 Language
🇺🇿 O'zbek 🇺🇿 Ўзбек 🇷🇺 Русский 🇬🇧 English ✓