• Resolved AnnaHavanna

    (@annahavanna)


    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)
  • amsgator

    (@amsgator)

    You’re going to have to paste the contents of the .htaccess file or it’s going to be impossible to help

    Thread Starter AnnaHavanna

    (@annahavanna)

    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>
    amsgator

    (@amsgator)

    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 https://www.whatsmyip.org/

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

    Thread Starter AnnaHavanna

    (@annahavanna)

    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?

    amsgator

    (@amsgator)

    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.

    amsgator

    (@amsgator)

    Thread Starter AnnaHavanna

    (@annahavanna)

    Thanks!

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