How To Limit Access To WordPress Admin Panel By IP With .htaccess

In some future articles, I’m looking forward to talk about security and stuff. So, before I post them on this website, it’s more important to write all the basic stuff. In this article, I’ll show you how to limit access to WordPress admin panel by IP address with your .htaccess file. After using this trick only a certain IP address will be access to access the wp-admin of your WordPress website.

In your /wp-admin folder, add an .htaccess file with the following code in it:

Replace xx.xx.xx.xx with your current IP address. To know your IP address, you can use an online service such as What Is My IP.

Leave a Reply