Backup your database and files
Database and custom file backups are essential.
There are many posts in the forum topics about irrecoverable errors, WSOD, database gone fubar etc. There are times when your site goes awry or gets deleted or corrupted, and the only or best choice is to restore it from a backup.
Backup & Migrate
The Backup & Migrate module facilitates emergency recovery and site migration. You can configure it for automatic backups saved to the filesystem - with more frequent backups during development.
You can also create a manual backup before undertaking any complex configuration. That way, you have a "restore point" in case of disaster.
While there may be some issues of security when you save the database and content as a file (you could exclude certain tables, perhaps), the benefits of having a rollback in case of disaster are significant.
Read moreRecovering the administrator password
There are several methods to recover the Drupal administrator ("user 1") password. The fastest way is using drush.
Request new password via e-mail
You can reset your password by requesting a new password at http://www.example.com?q=user/password.
Change password with a database query
Drupal 7
Update administrator password via sql-query in Drupal 7.
Drupal 6 and below
Execute the following query on the Drupal database where 'givememypasswordback' is your new password. You will need to log into your database using phpMyAdmin or another tool.
UPDATE users SET pass = MD5('givememypasswordback') WHERE uid=1;Recover password with Drush
Drush offers a number of methods to recover the administrator's password.
Generate login-link
Drush can generate a one-time login link.
drush uliReset password
drush upwd --password="givememypasswordback" admin(where "admin" is the user name)
Update password with query
drush sql-query "UPDATE users SET pass = MD5('givememypasswordback') WHERE uid =1;"