Disables XML-RPC

Disables XML-RPC to improve security and prevent external access.

PHP
/**
 * Snippet Name:     Disables XML-RPC
 * Snippet Author:   coding-bunny.com
 * Description:      Disables XML-RPC to improve security and prevent external access.
 */

function cb_disable_xmlrpc() {
    // Disable XML-RPC
    add_filter( 'xmlrpc_enabled', '__return_false' );
}
add_action( 'init', 'cb_disable_xmlrpc' );

How To Implement This Solution?

Leave a Reply