Skip to content

Instantly share code, notes, and snippets.

@BenceSzalai
Created December 10, 2023 11:28
Show Gist options
  • Save BenceSzalai/b6b841452b9c60f629ce776960cd81af to your computer and use it in GitHub Desktop.
Save BenceSzalai/b6b841452b9c60f629ce776960cd81af to your computer and use it in GitHub Desktop.
Block access to xml-rpc except for a set of IP addresses
# Block WordPress xmlrpc.php requests
<Files xmlrpc.php>
#Require ip xxx.xxx.xxx.xx1
#Require ip xxx.xxx.xxx.xx2
#... add more enabled IP addresses as needed!
Require all denied
</Files>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment