How To Limit Access To WordPress Login By IP With .htaccess

In last tutorial, I showed you how to limit access to your WordPress’ admin panel by IP address. You can also limit access to WordPress login by IP address with a tweaked version of that code. Only a certain IP will be able to access your wp-login.php file.

Add following code to the .htaccess file of your root folder, or create one:

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.