How to Disable XML-RPC in WordPress

Simply add this code to your functions.php file:

// Disable xmlrpc by SEODOX
function disable_xmlrpc( $methods ) {
return array();
}
add_filter( 'xmlrpc_methods', 'disable_xmlrpc' );

This filter will remove completely xmlrpc.php requests. It is important to make WordPress more secure.