back home

Disable XML-RPC in WordPress to Prevent DDoS Attack

October 20, 2017

Add the following code to wp-config.php

add_filter('xmlrpc_enabled', '__return_false');

Input the following code near the top of .htaccess file:

# START XML RPC BLOCKING
< Files xmlrpc.php >
Order Deny,Allow
Deny from all
< /Files >
# FINISH XML RPC BLOCKING