Can I disable xml-rpc by setting it to false?
I've been searching about it and came across with this snippet code, will it disable safely the xml-rpc
?
// set below line to false in /public_html/xmlrpc.php
...
define( 'XMLRPC_REQUEST', true );
...
Update
I've installed and activated Disable XML-RPC plugin, but the wordpress security scanner still showing it is enabled!
(I'm newbie in wordpress/php code development )
Update2
I've installed wpscan
and just use it to test my web site and here is the result for xml-rpc
:
[+] XML-RPC seems to be enabled: https://..../xmlrpc.php
| Found By: Link Tag (Passive Detection)
| Confidence: 100%
| Confirmed By: Direct Access (Aggressive Detection), 100% confidence
| References:
| - http://codex.wordpress.org/XML-RPC_Pingback_API
| - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_ghost_scanner/
| - https://www.rapid7.com/db/modules/auxiliary/dos/http/wordpress_xmlrpc_dos/
| - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_xmlrpc_login/
| - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_pingback_access/
[+] WordPress version 5.9 identified (Latest, released on 2022-01-25).
| Found By: Rss Generator (Passive Detection)
| - https://..../feed/, generatorhttps://wordpress.org/?v=5.9/generator
| - https://cafedx.com/comments/feed/, generatorhttps://wordpress.org/?v=5.9/generator