Secure WordPress Login Page by IP Address

Featured Video Play Icon

WordPress Tutorial: In simple steps, going to show you how to secure WordPress login page by ip address. The following codes are tested by using WordPress .htacces file and working fine.

Step 1: Please backup your wordpress .htaccess file before making any changes

Step 2: Open wordpress root .htaccess file for editing.

Step 3: Add this below code

# Secure WordPress Login Page by IP Address
<Files wp-login.php>
order deny,allow
Deny from all
# Change below IP Address to Allow Access
allow from XXX.XXX.XXX.XXX
</Files>

Step 4: Replace xxx.xxx.xxx.xxx with your own ip address.

Step 5: Save it and you are done.

Note: If you don’t know what is your ip address then type “what’s my ip” in web browser address bar or in google search engine.