How to Limit Access by IP to Your wp-login.php file in WordPress

Michael Oldborn

How to Limit Access by IP to Your wp-login.php file in WordPress

In one of the earlier articles, we provided the necessary information about “How and Why You Should Limit Login Attempts in Your WordPress” We mentioned that you can easily limit this with the help of a plugin. In this article, we will explain you how to limit IP access to your wp-login.php file.

Important Note: it can be risky for those who new to WordPress to do this because making a small mistake can disrupt other settings of your site.

You need to open the .htaccess and then copy paste the following snippets at the top of this file and save it.

<Files wp-login.php>

        order deny,allow

        Deny from all

# whitelist West Palm Beach IP address

allow from xx.xxx.xx.xx

#whitelist Gainesvile IP Address

allow from xx.xxx.xx.xx

</Files>

Those xx.xxx… are referring to ip address. So, you may replace thm with your own real ip address. Finally, we have to say that the style of your Wp-login.php may be corrupted but that’s not the first priority here. You should know that our first priorty is only to limit failed entry attempts.

Why is WordPress Security Important

If you have any questions about this article or other topics, please click the button below. Your questions will be answered soon.

Quality And Fast Hosting

If you want an affordable, reliable and fast WordPress server, just go ahead and click on the button and get a package as needed.

Leave a Reply

Your email address will not be published. Required fields are marked *

Archives