Site AI Auditby Internet Solutions

WordPress xmlrpc.php: What It Does and When to Disable It

29 tháng 9, 20268 phút đọcBảo mật & SSL
WordPress xmlrpc.php: What It Does and When to Disable It

Short answer: xmlrpc.php is an old interface that lets external apps and services talk to a WordPress site: publish posts, manage comments and send pingbacks. Most sites no longer need it, because the modern REST API does the same jobs, but it is still enabled by default and is a popular target for password-guessing and pingback abuse. If nothing on your site depends on it, block it at the server level and test that it returns 403. If a service such as Jetpack uses it, keep it open but protect it.

What xmlrpc.php is

XML-RPC is a simple protocol for calling functions on a remote server by sending XML over HTTP. WordPress adopted it early to let people publish from desktop blogging tools and, later, from mobile apps. The file xmlrpc.php in the root of every WordPress installation is the entry point: an app sends a request to it with a username, password and an instruction such as “create a new post”.

XML-RPC has been switched on by default in WordPress for more than a decade. Over the same period, WordPress added the REST API, a more modern interface used by the block editor, current mobile apps and most integrations. For many sites, xmlrpc.php is now a legacy door that nobody uses but that remains open.

The difference matters for security. The REST API has a more modern permission model and supports application passwords, which give each integration its own credential that can be revoked without changing your main password. XML-RPC, by contrast, usually works with the account’s normal password, so every tool that uses it holds a key to the whole account.

If you open https://your-site/xmlrpc.php in a browser and see “XML-RPC server accepts POST requests only”, the interface is active.

Why attackers target it

Automated attacks against WordPress routinely probe xmlrpc.php. There are three main reasons.

Even when attacks fail, the flood of requests to xmlrpc.php can use enough server resources to slow the site down. Our guide to brute-force login protection explains the password-guessing side in more detail.

Signs your xmlrpc.php is under attack

Many site owners only discover XML-RPC when their host complains about resource use. Typical signs include:

If you see these patterns, blocking xmlrpc.php at the server usually brings resource use down immediately. Then check that no account was actually compromised: review administrator users, recent logins and recently changed content, and change passwords for accounts that were targeted.

Who still needs XML-RPC

Before blocking it, check whether anything on your site depends on it. Common cases:

Tool or featureUses XML-RPC?What to do
JetpackYes, for its connection to WordPress.comKeep it available, or allow only Jetpack’s servers
Official WordPress mobile appCurrent versions can use the REST APITest the app after blocking
Old desktop blogging toolsOften yesSwitch to the web editor or a REST-based tool
Pingbacks and trackbacksYesMost sites can switch them off
Some remote management or publishing servicesSometimesCheck their documentation or ask support
Block editor, REST API integrationsNoUnaffected by blocking xmlrpc.php

If you are not sure, look in your server access logs for successful POST requests to xmlrpc.php from recognisable services, or block it on a staging copy first and test your tools.

Three ways to disable it

1. Block the file at the web server (most effective)

Blocking at the server stops the request before WordPress even loads, which also saves resources during attacks.

On Apache or LiteSpeed, add this to the .htaccess file in the site root, outside the WordPress rewrite block:

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

On Nginx, add to the server block, before the general PHP location:

location = /xmlrpc.php {
    deny all;
}

If you use Jetpack, allow the service’s published IP ranges instead of denying everything, following Jetpack’s own documentation.

2. Use the firewall, CDN or host

Many web application firewalls, CDNs and managed WordPress hosts offer a rule or a switch to block or rate-limit xmlrpc.php. This works well if you already use one. See whether your website needs a WAF for background.

3. Disable it inside WordPress

Security plugins often include a “disable XML-RPC” option, and developers can use the xmlrpc_enabled filter. Be aware of two limits: WordPress still loads to handle each request, so attack traffic still costs resources, and the xmlrpc_enabled filter by itself turns off methods that require a login but not necessarily pingbacks. Check exactly what your plugin blocks. A server-level rule is simpler and more complete.

Test that it is really blocked

Do not rely on a setting screen; test the result from outside.

  1. Open https://your-site/xmlrpc.php in a browser. You should see a 403 Forbidden error, not the “accepts POST requests only” message.
  2. Send a real XML-RPC request from the command line, for example: curl -s -d '<methodCall><methodName>system.listMethods</methodName></methodCall>' https://your-site/xmlrpc.php. A blocked endpoint returns 403 rather than a list of methods.
  3. If you use a CDN, test from outside your office network so you see what the public sees.
  4. Test the tools that should still work: the block editor, your mobile app and any integrations.

Repeat the test after moving hosts, changing CDN settings or switching between Apache and Nginx, because a rule in one place can silently stop applying.

If you must keep it enabled

When a service you rely on needs XML-RPC, reduce the risk instead of closing it:

XML-RPC in the bigger security picture

Closing xmlrpc.php is a quick, worthwhile hardening step, but it is one item in a longer list. Attackers who find it closed will try the login page, vulnerable plugins or stolen passwords instead. Treat it as part of a routine that also covers updates, backups, user accounts, security headers and file protections such as blocking PHP execution in uploads. The WordPress security checklist puts these steps in order, and hiding version details, covered in exposed software versions, makes automated targeting a little harder too.

How Site AI Audit helps

Site AI Audit checks your website from the outside: the SSL certificate and expiry, the HTTPS redirect, security headers and exposed software versions, together with SEO, speed and e-mail authentication. Findings are explained in plain words and ranked by impact, so you can see which security basics need attention first. Paid plans on the pricing page add re-checks and monitoring with alerts.

Related reading

The bottom line

xmlrpc.php is a remote access interface from an earlier era of WordPress. Most sites no longer use it, and attackers use it to guess passwords efficiently and abuse pingbacks. Check whether Jetpack or another tool depends on it; if not, block it at the server and confirm a 403. If you must keep it, restrict and rate-limit it and protect every account with strong credentials.

FAQ

Is it safe to disable xmlrpc.php?

For most sites, yes. The block editor and REST API integrations do not use it. Check first whether Jetpack, an older app or a remote publishing service depends on it.

Does Jetpack need XML-RPC?

Yes, Jetpack uses XML-RPC to communicate with WordPress.com. If you use Jetpack, allow its servers rather than blocking xmlrpc.php for everyone.

Why do I see so many requests to xmlrpc.php in my logs?

Automated bots probe it constantly, mostly to guess passwords or abuse pingbacks. The volume alone can slow a site, which is another reason to block it at the server.

Is the xmlrpc_enabled filter enough to disable XML-RPC?

Not completely. It turns off methods that require authentication, but WordPress still processes requests and pingbacks may remain. A server-level block is more complete and saves resources.

How do I check if XML-RPC is enabled on my site?

Open your-site/xmlrpc.php in a browser. The message “XML-RPC server accepts POST requests only” means it is active; a 403 error means it is blocked.

#Website security#WordPress#WordPress security
Hãy kiểm tra website của chính bạn — miễn phí.Website của bạn cần sửa gì — và nên bắt đầu từ đâu.
Bắt đầu miễn phí
Internet Solutions

Sản phẩm khác từ đội ngũ chúng tôi

Do Internet Solutions phát triển. Hãy thử các sản phẩm khác của chúng tôi — mỗi sản phẩm giúp bạn tiết kiệm thời gian theo một cách riêng.

internet-solutions.net ↗
01Tự động đăng mạng xã hội
PostRSS

Bài mới từ nguồn cấp RSS của bạn được tự động đăng lên Facebook, X, LinkedIn, Telegram và hơn 60 mạng khác.

Gói miễn phí · từ 2014Truy cập →
02Chat trực tuyến AI cho website
Talkmio

Website của bạn trả lời khách truy cập 24/7 từ chính nội dung của bạn, bằng ngôn ngữ của họ.

Gói miễn phí · không cần thẻTruy cập →
03Trợ lý AI
Ask Mio

Trò chuyện, viết code, thiết kế, viết bài và nghiên cứu. Mio chọn mô hình tốt nhất cho từng việc.

Gói miễn phíTruy cập →
04Lái tự động AI cho blog và mạng xã hội
AI Blog Autopilot

AI viết bài SEO dài 2.000–3.000 từ và chia sẻ từng bài lên hơn 58 mạng xã hội.

3 bài đầu tiên miễn phíTruy cập →
05Thu thập SEO chuyên sâu
Site SEO AI Audit

Thu thập SEO toàn diện trên 7 lĩnh vực, gồm cả khả năng hiển thị trong tìm kiếm AI, với cách sửa xếp theo mức tác động.

Lần kiểm tra đầu tiên miễn phíTruy cập →
06Nguồn cấp RSS và sản phẩm
RSS Feed Creator

Tạo RSS từ bất kỳ trang web nào, cùng nguồn cấp sản phẩm cho Google và Meta tự động cập nhật.

Gói miễn phíTruy cập →
07Phát triển website và SEO
Internet Solutions

Website, cửa hàng trực tuyến và hệ thống theo yêu cầu, do đội ngũ của chúng tôi thiết kế, xây dựng và vận hành.

Từ 2011Truy cập →
Site AI Audit
Tổng quan quyền riêng tư

Website này dùng cookie để mang lại trải nghiệm người dùng tốt nhất có thể. Thông tin cookie được lưu trong trình duyệt của bạn và thực hiện các chức năng như nhận ra bạn khi bạn quay lại, giúp đội ngũ chúng tôi hiểu phần nào của website bạn thấy thú vị và hữu ích nhất.