xmlrpc.com is a WordPress file that was intended to be used for API’s but lately it’s more and more used as a way for hackers to brute-force WordPress installations.
To block access to xmlrpc.php on a single WordPress installation add the following code to your .htaccess file:
deny from all
allow from 127.0.0.1
And in WHM to block access to xmlrpc.php file for all websites hosted on cPanel, add the following to WHM > Service Configuration > Apache Configuration > Include Editor
RedirectMatch 301 /xmlrpc.php http://127.0.0.1/
All request to xmprpc.php file across all cPanel account will be blocked.