If you don’t require XML-RPC functionality on your WordPress site, one approach to enhance security is to block access to the xmlrpc.php
file. This can be achieved by adding the following code to your site’s .htaccess
file:
<Files xmlrpc.php>
Order Deny,Allow
Deny from all
</Files>