If you're a developer working on a Drupal site yet-to-be released, password protect the site using the Apache htaccess facility.
Edit the file DRUPAL_ROOT/.htaccess to add lines similar to these:
# Require popup dialog for access
AuthType Basic
AuthName "You must give a password"
AuthUserFile /home/me/.htpasswd
Require valid-user
Now, create the password file with a username and password in it, in the example below, the username is FOO:
Read More