// Disable XML-RPC add_filter('xmlrpc_enabled', '__return_false'); // Remove the RSD link from the WordPress header remove_action('wp_head', 'rsd_link'); // Disable X-Pingback HTTP header add_filter('wp_headers', function($headers) { unset($headers['X-Pingback']); return $headers; }); // Disable pingbacks add_filter('xmlrpc_methods', function($methods) { unset($methods['pingback.ping']); return $methods; });