XML-RPC 是 WordPress 离线发布协议,如果你使用 Windows Live Writer 来发布文章,你必须开启这个功能,反之,建议你关闭这个功能,以免存在安全隐患。
在WordPress 3.5 以前的版本中,这个功能是可以自己设置是否开启的,但是3.5默认开启,而且后台不在提供关闭设置选项。
如何才能关闭XML-RPC呢?
其实,一切都比较简单,仅仅添加下面的代码到你主题的 functions.php 文件的最后一个 ?> 前即可:
add_filter('xmlrpc_enabled', '__return_false');
当然了,如果你觉得这样还不够的话,你可以试试 Control XML-RPC publishing 插件,安装并启用以后,默认就关闭了 XML-RPC,并且,在 后台 – 设置 – 撰写,重新恢复了该功能的设置选项,你可以在这里设置是否开启哦!
2020年5月更新:更多禁用方法请看《什么是XML-RPC,为什么以及如何禁用它?》
来源:
https://www.wpdaxue.com/disable-xml-rpc.html
微信公众号
手机浏览(小程序)
Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57
Warning: get_headers(): Failed to enable crypto in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57
Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_32498.jpg): failed to open stream: operation failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57