Home / htaccess / Admin IP whitelist
  • How to Admin IP whitelist

    no thumbnail sorry: Admin IP whitelist

    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,

    ( click code to copy )

    wordpress snippet : HTACCESS

    <>
    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>
    

    ( WordPress codex functions, hooks, in this snippet. )