wordpress禁用xmlrpc

将以下代码插入到functions.php文件中即可 add_filter("xmlrpc_enabled", "__return_false"); add_filter("xmlrpc_methods", function ($methods) { unset($methods["pingback.ping"]); return $methods; });