Disable xml-rpc

How to Disable XML-RPC in WordPress 3.5

All you have to do is paste the following code in a site-specific plugin:

1
add_filter('xmlrpc_enabled', '__return_false');

Alternatively, you can just install the plugin called Disable XML-RPC. All you have to do is activate it. It does the exact same thing as the code above.

How to Disable WordPress XML-RPC with .htaccess

While the above solution is sufficient for many, it can still be resource intensive for sites that are getting attacked.

In those cases, you may want to disable all xmlrpc.php requests from the .htaccess file before the request is even passed onto WordPress.

Simply paste the following code in your .htaccess file:

1
2
3
4
5
6
# Block WordPress xmlrpc.php requests
<Filesxmlrpc.php>
order deny,allow
deny from all
allow from 123.123.123.123
</Files>

https://null-byte.wonderhowto.com/how-to/gain-control-wordpress-by-exploiting-xml-rpc-0174864/

https://blog.sucuri.net/2015/10/brute-force-amplification-attacks-against-wordpress-xmlrpc.html

Leave a Reply

You must be logged in to post a comment.