In this article, we will show you how you can limit wp-admin folder access by IP address using .htaccess file.
First you need to open your .htaccess file located in your /wp-admin/ folder, and make a backup.
Note: Do not edit your Root .htaccess file, don’t paste these codes in there. It must be /wp-admin/.htaccess if you don’t see that file then create a blank file, name it .htaccess in your wp-admin folder.
Then paste the following code:
Paste your IP Address and upload the file.
Now if you have more than one IP make sure you list them there. For example, Work, Home, Vacation IP, if you ever use it. Each time you want to visit your wp-admin panel from another location, you would have to add an extra IP address. That is the only downside to this hack, but this will keep your wp-admin folder safe.