Skip to content

How to restrict the IP addresses that can log into WordPress

If you are using a global IP, restricting the IP that can access to the management screen will greatly increase security. Access control to the management screen can be done very easily using the HTACCESS file.

Restrict access to the WordPress login page to specific IP

If you connect to the directory where WordPress is installed with FTP software, you can find a file called .htaccess.

This file is like a server configuration file where you can write various access settings on the server where WordPress is running.

It is possible to make only the IP addresses and have access to the login screen by describing as follows.

<Files wp-login.php>
order deny,allow
Deny from all

allow from
allow from

Files wp-login.php → It means for wp-login.php (a program that displays the login screen)
order deny,allow → It means to set access permission after setting access denial
Deny from all → It means to deny all access once
allow from → However, it means that only IP addresses are allowed

How do I find my current IP?

To find out what IP you are using, please visit this site . The IP of your computer being accessed is displayed.

* To further improve WordPress security, please use our WordPress Doctor Malware Scan & Security Plug-in .