Directory privacy (password protection) in WHSPanel

Folder Privacy locks a folder on your site so that anyone who tries to open it in a browser is prompted for a username and password (HTTP Basic authentication). It is useful for test versions of the site, admin area or any content that you want only certain people to see.

1. Overview

Open in the menu Security well Directory privacy. The table shows all protected folders with a label and username.

2. How to protect a folder

  1. Click Protect directory.
  2. Directory path: the folder you are locking (eg /home/user/public_html/admin).
  3. Protection label: the message the visitor sees in the login window.
  4. Username and Password for access.
  5. Click OK.

You can add multiple users to the same protected directory and remove individual users without affecting others.

Note: this is server-level protection, independent of any CMS (it works before WordPress or another application even loads). It is ideal to hide the staging (trial) version of the site from the public and search engines.