change wp-admin folder change wp-admin folder wordpress wordpress

change wp-admin folder


  • The below code will prevent browser access to any file in these directories other than "a.b.c.d" which you should change to be your static IP address.

-

order deny,allowallow from a.b.c.d # This is your static IPdeny from all
  • OR restrict the directory with a password:

-

AuthUserFile /etc/httpd/htpasswdAuthType BasicAuthName "restricted"Order Deny,AllowDeny from allRequire valid-userSatisfy any


I use the following in my .htaccess file in the wp-admin folder:

order deny,allowallow from 12.34.56.78 # My IPdeny from all

It will give a 404 error to anyone not on that IP address.

I also use the same for the wp-login.php page. Put this in your root .htaccess file:

<Files "wp-login.php">Order deny,allowDeny from allAllow from 12.34.56.78</Files>