1. Add this to the .htaccess file, change path as needed.
2. Go to terminal.
3. Enter the following to add or change username and password:
4. Enter password.
Code:
<Files admin.php>
AuthType Basic
AuthName "Restricted Area"
AuthUserFile /home/username/public_html/.htpasswd
Require valid-user
</Files>
2. Go to terminal.
3. Enter the following to add or change username and password:
htpasswd -c /home/username/public_html/.htpasswd Andy
4. Enter password.