Limit to access the admin login in wordpress using htaccess594

Admin Login
Author: InfoBeep - August 27, 2017 | subject to copyright

Using .htaccess can help you secure your site as it limits the login ability, meaning only from specific IPs can log in to the admin panel of your site.

Now, to limit access in .htaccess. You need to follow the steps below:

  1. Go to: /wp-admin/.htaccess. if you don’t file “.htaccess” file create a file name “.htaccess” inside wp-admin folder.
  2. Paste the code below:

AuthUserFile /dev/null
AuthGroupFile /dev/null
AuthName “WordPress Admin Access Control”
AuthType Basic
order deny,allow
deny from all
# whitelist Desi’s IP address
allow from
# whitelist Monika’s IP address
allow from

Note: Fill the “xx” with your IP.

Note: we recommend you backup your site before you use the code.