By Hridoy Ahmed | Last updated: November 2026 | 9 min read
Short answer: Disable WordPress XML-RPC if you do not use it. XML-RPC is an old remote-access feature that attackers can use to try many passwords in one request and to abuse pingbacks. If you do not rely on Jetpack, an older publishing app or another tool that needs it, block
xmlrpc.phpat the server or firewall level. If you need it, restrict and rate limit it instead.
In this guide
- What XML-RPC is
- Why it is a risk
- Do you need it?
- How to check if it is on
- How to disable it, best method first
- How to test the result
- If you need XML-RPC
- Myths
- FAQ
What XML-RPC is
XML-RPC is a file in your WordPress root, xmlrpc.php, that lets other software talk to your site. Years ago it was the main way to publish from a phone app or a desktop editor. WordPress has enabled it by default since version 3.5. The REST API has since replaced it for most modern tools, but the file still exists on almost every site.
Why it is a risk
XML-RPC is a feature, not a bug. Attackers abuse it in three ways:
- Password guessing at scale. One XML-RPC request can carry many login attempts, so simple per-request limits miss them. This makes brute force attacks more efficient. See how to spot and stop login attacks.
- Pingback abuse. The pingback function can be used to make your site send requests to other sites, which attackers have used to help flood targets with traffic.
- Extra load. Bots hitting the file can use server resources even when every request fails.
The file is not a vulnerability on its own. The risk is leaving a rarely used door open.
Do you need it?
| Tool or use | Needs XML-RPC? | Note |
|---|---|---|
| Jetpack | Possibly | Jetpack has relied on XML-RPC for parts of its connection to WordPress.com. Check the current Jetpack documentation before you block it |
| WordPress mobile apps | Depends on version and setup | Newer versions use the REST API. Test with your app |
| Older desktop or third-party publishing tools | Often yes | Many such tools still use it |
| Pingbacks and trackbacks | Yes | Few sites need them today |
| Old automation tools or integrations | Sometimes | Check each integration’s documentation |
| Normal posting and site editing in the dashboard | No | The dashboard and block editor do not use it |
Rule of thumb: If none of those tools applies to you, disable it. If you are not sure, test on a staging copy first. See my guide to the WordPress staging site.
How to check if it is on
Open https://yourdomain.com/xmlrpc.php in a browser. If you see a short message saying that the XML-RPC server accepts POST requests only, the file is reachable. That does not mean you are hacked. It tells you the endpoint answers.
Also look at your access logs. Many requests to /xmlrpc.php from the same few addresses point to bot activity.
How to disable it, best method first
Back up your site and your .htaccess file before you edit anything.
Method 1: Block it at the server (best)
This stops the request before WordPress and PHP load, so it also saves resources.
Apache 2.4 (.htaccess):
<Files xmlrpc.php>
Require all denied
</Files>
Older Apache versions use Order deny,allow with Deny from all. Check your host’s version if the rule above gives an error.
Nginx (server configuration):
location = /xmlrpc.php {
deny all;
}
Reload Nginx after the change. If you use managed hosting and cannot edit these files, ask support to block the path.
Method 2: Block it at the firewall or CDN
Create a rule that blocks or challenges requests to the path /xmlrpc.php. This works well with Cloudflare and similar services. See Cloudflare for WordPress and my guide to the WordPress firewall.
Method 3: Use a plugin setting
Many security plugins offer a switch to disable XML-RPC. This is easy but less complete, because WordPress still loads and handles the request.
Method 4: A code filter (partial)
add_filter( 'xmlrpc_enabled', '__return_false' );
This filter turns off XML-RPC methods that require authentication. The file still answers requests, and some functions such as pingbacks may keep working, so do not treat it as a full block. Use it alongside a server or firewall rule.
Also turn off pingbacks
In the WordPress dashboard, open Settings, then Discussion. Untick the option that allows link notifications from other blogs (pingbacks and trackbacks) if you do not use them. Existing posts may need a bulk edit.
How to test the result
- Open
/xmlrpc.phpagain. You should now see an error such as 403 (forbidden) or a blocked page. - Log in to the dashboard and edit a post to confirm that nothing broke.
- Check Jetpack, your mobile app and any automation that publishes to your site.
- Watch your logs for a day. Blocked requests should now end with a 403 status.
- Check your security plugin and any monitoring tool for new warnings.
If you need XML-RPC
- Restrict access by IP address if the tools that need it use fixed addresses.
- Rate limit requests to the file at the firewall.
- Use strong, unique passwords and use application passwords for tools instead of your main password where possible.
- Check your two-factor plugin. Some plugins do not protect XML-RPC logins unless you enable that option. Read my guide on WordPress two-factor authentication.
- Keep WordPress and plugins updated.
Need help hardening a live site without breaking integrations? See my WordPress security service.
Myths
- “Disabling XML-RPC makes my site much faster.” It only helps if bots were hitting it heavily.
- “XML-RPC is how most sites get hacked.” Outdated plugins and weak passwords cause far more incidents. XML-RPC is one of several doors.
- “Blocking it fully secures my login.” It closes one path. You still need strong passwords, 2FA and login limits. See my WordPress security checklist.
FAQ
Is XML-RPC enabled by default in WordPress?
Yes. It has been on by default since WordPress 3.5, and no setting in the dashboard turns it off.
Will disabling XML-RPC break my site?
It will not break normal posting or editing. It can break tools that depend on it, so test first.
Is the REST API also a risk?
The REST API is part of modern WordPress and powers the block editor. Keep it available and protect it with updates, strong logins and rules that suit your site.
Does XML-RPC affect SEO?
Not directly. But a flood of bot requests can slow your server, and a hacked site hurts SEO. Read about signs that your site is hacked.
Can I allow Jetpack and block everyone else?
Possibly, with IP-based rules, but those rules need maintenance. Check Jetpack’s current documentation first.
Want your login and endpoints locked down properly? I harden WordPress sites by hand and test that nothing breaks. See my WordPress security and malware removal service.
About the author: Hridoy Ahmed is an SEO specialist and WordPress security expert based in Dhaka, Bangladesh. He has 8+ years of experience and works with clients worldwide.
