Steps :
And Save it.
Done! Your install directory and admin.php is now password protected.
The credentials that you set in Step 3 will be used to access these folders/files.
- Set directory Privacy for install folder from cPanel.
- Enable password protection for install directory.
- Set username and password of your choice. That user will be authorised.
- Then go to .htaccess file in install folder.
- Copy the path for the password file. [path is after AuthUserFile]
- Code:
AuthType Basic
AuthName "Protected 'public_html/install'"
AuthUserFile "/home/folder_name/.htpasswds/public_html/install/passwd"
Require valid-user - Go to the public_html folder and edit the .htaccess file.
- Add the following to the file.
- Code:
<Files admin.php>
AuthType Basic
AuthName "Protected 'public_html/install'"
AuthUserFile "/home/folder_name/.htpasswds/public_html/install/passwd"
Require valid-user
</Files>
And Save it.
Done! Your install directory and admin.php is now password protected.
The credentials that you set in Step 3 will be used to access these folders/files.