πŸ”΅
WordPress

Disable WordPress XML-RPC for Better Security

πŸ“… 8 October 2026 ✏️ 8 October 2026 ⏱ 4 min leestijd

Learn how to safely disable WordPress XML-RPC to prevent brute-force and DDoS attacks, with steps via wp-config.php, .htaccess, or a plugin.

XML-RPC is an outdated protocol that allows external applications to communicate with WordPress. It’s frequently abused for brute-force attacks and DDoS requests. If you don’t use apps or services that require XML-RPC, you can safely disable it via wp-config.php, .htaccess, or a plugin. This article explains the risks XML-RPC poses and shows you step by step how to disable it.

What is XML-RPC and why is it risky?

XML-RPC is a protocol that allows external applications, such as mobile apps and publishing tools, to exchange messages with WordPress. The xmlrpc.php file enables this, but nowadays it’s mostly abused by malicious actors because it bundles many functions through a single access point.

The main risks are:

  • Brute-force attacks: via the system.multicall function, attackers can pack thousands of login attempts into a single request, making rate-limiting harder to enforce.
  • DDoS attacks: XML-RPC can be used as a pingback mechanism to send mass requests to other sites via your server.
  • Abuse of vulnerable plugins: security vulnerabilities in plugins are sometimes only reachable through XML-RPC calls.

If you don’t use services that require XML-RPC, such as certain old mobile apps or Jetpack features, disabling it is a logical step to reduce your site’s attack surface.

Attackerxmlrpc.phpWordPressBlocked

Disabling XML-RPC: three methods

There are several ways to disable XML-RPC, depending on how drastic you want to be and whether you’re comfortable working with code.

  • Via wp-config.php: the most direct method, preventing XML-RPC functionality from loading at all.
  • Via .htaccess: blocks direct access to the xmlrpc.php file at server level, also works on LiteSpeed servers.
  • Via a plugin: suitable if you don’t want to work with code, but adds extra plugin overhead.

You can easily make these changes via the File Manager in Plesk, without needing an FTP program.

Step-by-step plan: via wp-config.php

1

Open the File Manager

Log in to Plesk and open the File Manager of your WordPress installation.

2

Create a backup

First make a backup of wp-config.php, so you can easily revert changes if needed.

3

Add the code

Open wp-config.php and add the following line right before the line “That’s all, stop editing!”: define(‘XMLRPC_REQUEST’, false);

4

Save and test

Save the file and visit yourdomain.com/xmlrpc.php. You should now see an error message instead of a valid response.

πŸ’‘ Tip: Prefer to block at server level? Then add the lines below to your .htaccess file in the WordPress root: <Files xmlrpc.php> Order Deny,Allow Deny from all </Files>

Checking security and additional measures

After disabling XML-RPC, verify that the change works by visiting xmlrpc.php directly. If you see an error message or a 403 page, the protocol is no longer accessible. Also keep the following in mind:

  • A plugin that requires XML-RPC, such as Jetpack or some mobile apps, may stop working after disabling it.
  • Keep WordPress, themes, and plugins up to date, this remains the most important security measure.
  • Use strong, unique passwords and two-factor authentication where possible.
  • Regularly check your log files in Plesk for suspicious requests to xmlrpc.php.
  • Make sure your site is covered by a working backup schedule, so you can quickly recover if something goes wrong.

You can find more background articles on WordPress security and server configuration in the knowledge base. If you’re also considering reliable business email alongside your website, or want to consolidate your domain names and hosting with one provider, check out the options to switch to Tandata.

Frequently Asked Questions

Does disabling XML-RPC affect apps?

Yes, apps and services that specifically use XML-RPC, such as some older mobile apps, will stop working afterward. If you use such apps, consider the REST API as an alternative instead of disabling XML-RPC entirely.

Can I re-enable XML-RPC later?

Yes, simply remove the added line from wp-config.php or the block from .htaccess to restore functionality.

Is disabling it always necessary?

Not necessarily. If you don’t use services that require XML-RPC, disabling it is a simple way to reduce your attack surface, even if your hosting already offers good security.

Does disabling via .htaccess work on every server?

The .htaccess method works on Apache and LiteSpeed servers. If your site runs on a different server configuration, check whether .htaccess is read, or use the wp-config.php method instead.

Conclusion

Disabling XML-RPC is a small change with a big impact on your WordPress site’s security. If you don’t use apps that need the protocol, a single line of code in wp-config.php or a block in .htaccess prevents attackers from abusing it for brute-force and DDoS attacks. Combine this with updates, strong passwords, and backups for a well-secured site.

View web hosting β†’

Was dit artikel nuttig?