Using Apache Web Server For blocking xmlrpc, adding this code into .htaccess file
<Files xmlrpc.php>
order allow,deny
deny from all
</Files>
But while adding this The domain being Unreachable. What should do...
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.
Sign up to join this communityCheck the 'order' order. I do it this way:
# Block WordPress xmlrpc.php requests
<Files xmlrpc.php>
order deny,allow
deny from all
# allow from xx.xx.xx.xx #add allowed IP addresses
</Files>
And, to ensure it's blocked, I add this to the functions.php file.
add_filter('xmlrpc_enabled', '__return_false');
Actually, I put the above command and others into a private plugin, so I don't have to worry about Child Themes, or theme changes.
(Side note: I had a WP site compromised via an xmlrpc attack.)