<?php
add_filter( 'xmlrpc_enabled', '__return_false' );Alternatively, if you use Apache:
# Block XML-RPC
<Files "xmlrpc.php">
Order Deny,Allow
Deny from all
</Files>Or OpenLiteSpeed:
<IfModule mod_rewrite.c>
RewriteEngine On
# No backslash before the 'x', and NC makes it case-insensitive
RewriteRule ^xmlrpc\.php$ - [F,L,NC]
</IfModule>