Skip to content

Instantly share code, notes, and snippets.

@carl-alberto
Created April 22, 2020 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carl-alberto/6a76b1f537ba79abd73b052f872df939 to your computer and use it in GitHub Desktop.
Save carl-alberto/6a76b1f537ba79abd73b052f872df939 to your computer and use it in GitHub Desktop.
Disable XML RPC in WP
# Block WordPress xmlrpc.php requests
<Files xmlrpc.php>
order deny,allow
deny from all
allow from 123.123.123.123
</Files>
<?php
/**
* Via theme's function.php or a custom plugin.
*
*/
add_filter('xmlrpc_enabled', '__return_false');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment