Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

How to Password Protect multiple WP-Admin folders

Discussion in 'Security' started by Kumar787, Dec 10, 2018.

Tags:
  1. Kumar787

    Kumar787 Registered

    Joined:
    Aug 25, 2017
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Internet
    cPanel Access Level:
    Root Administrator
    HI,

    I have a dedicated server with 100+ WP sites and the server is under bruteforce attack since few days.

    Is there anyway to password protect (directory privacy )Wp-admin folder for all sites via command line/ssh so that it can show a pop-up login before showing actual login page (example: [removed external URL]


    i remember my old hosting company do this via command line.
     
    #1 Kumar787, Dec 10, 2018
    Last edited by a moderator: Dec 10, 2018
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,334
    Likes Received:
    2,162
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @Kumar787,

    A single command isn't readily available, but you could develop a custom bash script that makes use of the following cPanel API 1 functions for all accounts:

    cPanel API 1 Functions - Htaccess::set_protect - Developer Documentation - cPanel Documentation
    cPanel API 1 Functions - Htaccess::set_pass - Developer Documentation - cPanel Documentation

    The easier approach is likely to setup global protection against these types of brute force attacks. The information in the following thread is helpful:

    wp-login.php and mod security

    You may also find this WordPress document helpful:

    Brute Force Attacks « WordPress Codex

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice