Password Protecting Directories
Protect specific folders on your website with username/password authentication.
Enable Directory Protection
- Log into cPanel
- Go to Files > Directory Privacy
- Navigate to folder you want to protect
- Click on the folder name
- Check Password protect this directory
- Enter protection name (e.g., "Admin Area")
- Click Save
Create Authorized User
- After enabling protection, scroll down
- Click Create User or + User
- Enter username
- Enter password (or generate)
- Click Save
Testing
- Visit the protected directory URL in browser
- Browser will prompt for username/password
- Enter credentials you created
- Access granted if correct
Managing Users
- Add more users: Click "Create User" again
- Change password: Click edit icon next to user
- Delete user: Click delete icon next to user
Remove Protection
- Go back to Directory Privacy
- Navigate to protected folder
- Uncheck Password protect this directory
- Click Save
Common Uses
- Protect admin panels
- Secure development/staging areas
- Restrict access to private content
- Add extra security layer to WordPress admin