Home > Article > CMS Tutorial > How to delete xmlrpc.php
Method to delete "xmlrpc.php": First add the code "add_filter('xmlrpc_enabled','__return_false');" to the header of the "functions.php" file; then delete "xmlrpc. php".
wordpressOptimize and disable xml-rpc, delete xmlrpc.php to prevent brute force cracking
The file in functions.php Add the following code to the head:
add_filter('xmlrpc_enabled','__return_false');
As shown in the figure, after adding OK, click the update button, thus turning off the XML-RPC function.
How to know whether the ban is successful? In the program log of the WordPress Android client, you can see the red words "XML-RPC service is disabled on this site". Remember to delete xmlrpc.php in the server.
Of course there are plug-in methods to disable xml-rpc, but the purpose of disabling xml-rpc itself is to prevent participation in DDoS attacks, speed up website access, and improve user experience. Add the code to the template function for better It can speed up website access. The use of a large number of plug-ins is also one of the reasons for slowing down website access. Therefore, if you can avoid using plug-ins for some small functions, try not to use them. Writing the code in template functions is faster and more efficient.
The above is the detailed content of How to delete xmlrpc.php. For more information, please follow other related articles on the PHP Chinese website!