• devrural

    (@devrural)


    Hi

    I have been trying to restrict access to my admin portal, like: wp-login.php using .htaccess file…
    But when i put the code bellow all my site are blocked for all visitors…

    AuthUserFile /dev/null
    AuthGroupFile /dev/null
    AuthName “WordPress Admin Access Control”
    AuthType Basic
    <LIMIT GET>
    order deny,allow
    deny from all
    allow from x.x.x.x
    </LIMIT>

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Where is this file? It should be .htaccess in the wp-admin directory, not in the site root. See https://www.wpbeginner.com/wp-tutorials/protect-your-admin-folder-in-wordpress-by-limiting-access-in-htaccess/

    Thread Starter devrural

    (@devrural)

    Hi Steven!

    Thanks for your reply, yes, i was trying put on root directory, on public_html folder…

    I tried put on wp-admin folder like the link, but don’t work. I copied the .htaccess file a deleted all content and put only the script like the site you send, but nothing work

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Didn’t work in what way? This is, by the way, not a great way to secure your site, if that’s your goal. The best way is with a strong password and two factor authentication.

    Thread Starter devrural

    (@devrural)

    Hi Steven!

    Thanks again, for you reply!

    Didn´t work if i put at browser: http://www.site…/wp-login.php

    I want try to block this, because, i have a lot of hacker every minute
    trying to access my website via this file, and others…

    I don’t know why, my site isn’t published yet, im in constrution, its a new website, but i have installed only WordFence plugin and i have more than 200 tried hacks access ebery day, in my WordFence Log…The scan is clean…

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    People rattling your doorknob is common and does not mean your site has been hacked. It’s just a fact of being on the internet. Let WordFence do its job.

    Thread Starter devrural

    (@devrural)

    Hi Steven!

    Thanks again!

    I calmed down now 🙂

    But its curious, because my subdmoain there was no attempt…This occurs only in the primary domain…

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘htaccess blocking all site’ is closed to new replies.