(1) Create an .htaccess file
Go to http://www.htaccesstools.com/htaccess-authentication/
In the first box enter some optional text which gets displayed in the login box
In the second box you need to enter the file path name to a second file htpasswd file. The htpasswd file is where the
list of users / passwords are to be located.
Click on the button, copy the text and place it into a text file. Name this file .htaccess and upload it to the folder
that you want to protect. In this case this would be the /admin/ folder.
(2) Create the .htpasswd username / password file
Go to http://www.htaccesstools.com/htpasswd-generator/
In the first box enter the username.
In the second box enter the password.
Click the button, copy the text and place it into a text file. Name this file .htpasswd and upload it to a suitable
location on your server. This can be anywhere on your server, but usually in a defined folder. The location is the same
location as was entered in (1) above.
The folder as defined in (1) should now be protected by the username / password as defined in (2)