How to allow only your IP adress on the wp-admin directory

Posted by

How to allow only your IP adress on the wp-admin directory

If you have a static IP, this code will surely help you. You need to add some code in .htaccess file. All you have to do is to enter your static IP adress on line 8. Note that you can add more IPs if needed, by creating a new line with: allow from xx.xx.xxx.xx inside. (First take the back up of your .htaccess file)

AuthUserFile /dev/null

AuthGroupFile /dev/null

AuthName “Example Access Control”

AuthType Basic

<LIMIT GET>

order deny,allow

deny from all

allow from xx.xx.xx.xx

</LIMIT>

Ryan S.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.