WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Problems with htaccess (7 posts)

  1. AnnaHavanna
    Member
    Posted 8 months ago #

    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!

  2. amsgator
    Member
    Posted 8 months ago #

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

  3. AnnaHavanna
    Member
    Posted 8 months ago #

    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>
  4. amsgator
    Member
    Posted 8 months ago #

    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

  5. AnnaHavanna
    Member
    Posted 8 months ago #

    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?

  6. amsgator
    Member
    Posted 8 months ago #

    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.

  7. amsgator
    Member
    Posted 8 months ago #

  8. AnnaHavanna
    Member
    Posted 8 months ago #

    Thanks!

Reply

You must log in to post.

About this Topic