How to Disable the XML-RPC File in WordPress

Manuel campos

XML-RPC is a feature of WordPress that enables remote access to WordPress sites. While it can be useful in some situations, it can also be a security risk.

To disable XML-RPC in WordPress, you can use a plugin like Disable XML-RPC or simply add the following code to your site’s functions.php file:

add_filter('xmlrpc_enabled', '__return_false');

Keep in mind that this may break some functionality on your site, so be sure to test thoroughly after making this change.

Wanna buy me a Coffee?
JM
About me
I am José Manuel. I am writing about things I know and things that I am learning about WordPress. I hope you find the content of this blog useful.
Linktree
Care for Site Speed?
I think you can’t go wrong with Cloudways, CloudFlare, and Perfmatters.
Perfmatters Cloudways

WPSurfer.com

Resources to host, secure, speed up, rank, and monetize your WordPress sites.
Plugins
Services
Connect
LinkedIn
Facebook
LinkTree