WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Problems with htaccess

[Resolved] Problems with htaccess

  • I have several WordPress-pages with good security level. Now I am trying to make the sites saver.

    I have a .htaccess file which is protecting my site (in the root directory) but I would like to protect the wp-admin folder as well.

    The problem: I am blocking myself as well when I am adding the .htaccess file to the wp-admin folder.

    What could be my mistake?

    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You’re going to have to paste the contents of the .htaccess file or it’s going to be impossible to help

    That’s f.ex. the code for protecting the install.php in the wp-admin folder:

    # PROTECT install.php
    <Files install.php>
    Order Allow, Deny
    Deny from all
    Satisfy all
    </Files>

    Why are you trying to protect install.php?

    Regardless, you denied from all, that’s why you can’t access it either. If you want to be able to access make it this:

    # PROTECT install.php
    <Files install.php>
    Order Deny, Allow
    Deny from all
    Allow from **.***.**.***
    </Files>

    Where **.***.**.*** is your IP address. You can find your IP address at http://www.whatsmyip.org/

    Just know that your IP address changes every so often so you’re going to have to update it periodically

    Thanks. That’s what I tried yesterday. But my IP address is not static.

    How can I protect the wp-admin folder via .htaccess without blocking myself and without using my (changing) IP-address?

    If you have already installed your wordpress installation and are simply trying to make it so install.php is protected from everyone, that code should not prevent you from doing anything other than accessing install.php yourself (which you shouldn’t need to do)

    It shouldn’t stop you from viewing your site or logging in etc.

    You can try to password protect the wp-admin folder

    How to Password Protect Your WordPress Admin (wp-admin) Directory

    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] Problems with htaccess’ is closed to new replies.