Menu Close

How to Pretect Your WordPress Website wp-admin folder and wp-login.php file using .htaccess file ?

If you want to protect your wordpress website admin folder wp-admin folder by htaccess file. You can check How to deny IP address to your folder. In your wp-admin folder place a .htaccess file, and add following codes:

order allow,deny
allow from 207.241.90.37
deny from all

207.24.90.37 is your own IP address. So only you yourself can access your wp-admin folder.

You also need to secure your wp-login.php folder in your public root directory. Just add following codes into the htaccess file in your public root directory that have wp-login.php file:

<Files wp-login.php>
Order Deny,Allow
Deny from all
Allow from 207.241.90.37
</Files>

207.24.90.37 is your own IP address. Right now, only you can access your wp-admin folder and wp-login.php file.

Even though, you also need some secure plugins to protect your wordpress website.

 

Related Posts