When WordPress most popular content management system and world’s number of maximum website create on WordPress. where is it’s easy to learn and handle? WordPress website easy to hack by a hacker. If are your business website not secure. It’s easy to hack your company website and information. Website most important part of website security. Let’s know how to limit access to the WordPress login page to specific IP addresses.

There are many ways you can secure that aren’t too difficult to implement, including limiting access to your login page and admin dashboard to legitimate users.

Allow Access to WP Admin from specific IP

The code provides access to the only this Particular IP address otherwise you are not open your login page. Create a new .htaccess file and upload to the wp-admin directory. Now insert the following code in wp-admin/.htaccess file.

order deny,allow
allow from 172.94.37.33
deny from all

Allow Access Multiple IP Addresses

If you want to allow access to wp-admin from multiple IP addresses, list them as to allow from IP replace your old code in new code here.

allow from 172.94.37.33
allow from 192.210.161.111
allow from 198.46.154.184

Block IP Address to Access

If you don’t want to block every IP but specific IP to access WP Admin, you can block that IP address individually using the .htaccess file. Now insert the following code in wp-admin/.htaccess file.

order allow,deny
deny from 198.46.154.184
allow from all

Restrict Access by IP to wp-login.php file in WordPress

if you can limit access to the WordPress website. Open the main .htaccess file and insert the following code at top of the file.

<Files wp-login.php
order deny,allow
Deny from all
# allow access from my IP address
allow from 172.94.37.33
# allow access from my IP address
allow from 192.210.161.111
<?/Files>