WordPress tutorials: Admin IP whitelist

Wpsnipp – Adding this snippet to your htaccess file will whitelist a set of IP addresses that you wish to have access to your admin panel. Replace the xx.xx.xx.xxx with the IP address you wish to whitelist. Be careful with this you don’t want to block yourself from the admin panel.

 

 

AuthUserFile /dev/null
AuthGroupFile /dev/null
AuthName "WordPress Admin Access Control"
AuthType Basic
<LIMIT GET>
order deny,allow
deny from all
# whitelist Admin's IP address
allow from xx.xx.xx.xxx
# whitelist User 1's IP address
allow from xx.xx.xx.xxx
# whitelist User 2's IP address
allow from xx.xx.xx.xxx
</LIMIT>

Leave a comment