Drupal 7 contains administration functions built into its web application. In <Reports> there is a website status report as well as reports for errors, log messages, and available updates. The <Configuration> menu provides access to a Cron process for performing automated periodic maintenance, deletion of cache, and settings to control the display of error messages. In <People> you can create new user roles and assign the roles permissions. You can create users accounts and assign them one or more user roles. If you enable the Tracking module, you can also as setup tracking on user's accounts. Additional modules can be added and enabled to enhance the core functions, such as the Backup and Migrate module which allows for automated backups of the website database.
Additionally, a command shell called Drush can be used for system administration. Drush also provides a scripting interface for Drupal websites. Drush is more flexible, more precise, faster, and uses less system resources than does the administration functions built into Drupal's GUI web-interface. See the Drush page for more information on using the Drupal command shell.
Drupal 7 contains a maintenance mode. When maintenance mode is enabled, only users with “Use the site in maintenance mode” permission will be able to access the website. All other visitors will see a page indicating the website is currently under maintenance.
Backups Backup and Restoring Websites
A Drupal website consists of a database and a set of files. Both the database and the files need to be backed up. The drush archive-dump command will backup both the database and the files. There is also a Backup and Migrate module which can be added to the Drupal web application. The module allows for easy and automated backups of the website database (only the database, not files). One technique to using the Backup and Migrate module is to create a backup directory inside the Drupal website root. Then downloading or copying the website root to get both the database backup and the Drupal files.
Below is the procedure for setting up and using the Backup and Migrate module:
- Under <Configuration><Media><File System> specify a "Private File System Path" where you desire to store the database backups (e.g. sites/default/files/private/backups).
- Download, install, and enable the Backup and Migrate module.
- Under <Configuration><Backup and Migrate><Destinations> add a destination for the backups (Backups = sites/default/files/private/backups). Then under <Backup><Quick Backup> specify the destination (Backups). Run a quick backup and verify.
- Under <Advanced Backup> specify the desired configurations (e.g. Compression=Zip, Take site offline during backup, send email on backup success and failure). Then run advanced backup and verify.
- Under <Schedule> set up the desired backup schedules (eg Daily Backup, every 1 day, keep 3 backup files). Then run Cron and verify backup.
- FTP the entire website root to desired backup location. Verify.
Core Drupal contains three types of user roles:
- Anonymous User - User who is not logged in.
- Authenticated User- User who is logged in.
- Administrator - User who is logged in and and maintains the website.
Additional user roles can be defined in Drupal. Permission are assigned to each type of user role. When a new user account is created, it is assigned one or more user roles.
The permissions associated with user roles determine the account's capabilities on the website. There are numerous permissions that are set in <People.><Permissions>. The permission settings determine how the website will appear to the user. Permissions also determine what content the user can view, edit, delete, and creates as well as administration capabilities.User Accounts Registration and Cancellation Processes
There are settings for controlling the user registration and cancellation processes under <Configuration><People><Settings>. These setting provide options on who can create user accounts:
- Administrators Only - Only users assigned the administrator role can create user accounts.
- Visitors - Anyone using the website can create accounts by themselves.
- Visitors, but administration approval is required - Anyone sing the website can start the account creation process, but it must be approved by an administrator (default setting).
There is also a check box that requires e-mail verification before a visitor is able to create an account. When checked, an email is sent with a key value. If the user does not respond to that email within 24 hours, then they are not allowed a user account. (default is checked).
When setting up the site for visitors you may wish to enable the Tracking module. This will then show a tracking tab on the user's account where the user can see their history. Only the administrator will be able to see the tracking history of others.User Emails Welcome, Password Recover, Account Activated or Blocked
Under <Configuration><People><Settings>, there are also controls for determining when the website will send an email to a user. There are editable form letters associated with account events such as welcoming a new user, recovering a user's password, and the activation, blocking, or cancellation of a user account.
Configuration Note: (D7) When acting as an anonymous user and attempting to set up an account, I received the message: "Unable to send e-mail. Contact the site administrator if the problem persists". The new user was added to the database in a blocked status, but no emails were sent by Drupal at all. Below are the steps to resolve the problem:
- Created an email account on the same domain as the Drupal site:
- Email Account: firstname.lastname@example.org
- POP3: mail.kcshadow.net
- SMTP: mail.kcshadow.net
Then to test the account: telnet email@example.com 110. Should get a POP3 OK reply.
- Installed the SMTP Authentication module (bypassing the default PHP email function). Configurations for SMTP module:
- SMTP Server: mail.kcshadow.net
- SMTP Port: 25
- User Name: firstname.lastname@example.org
- Email from address: email@example.com
- Then under <Configuration><Site Information> changed the email address to be: firstname.lastname@example.org.
To set up the account in Thunderbird email:
- In <Tools><Account Settings><Add Account>
- Account Name = Hiking Trails.
- Your Name = Hiking Trails.
- Email Address = email@example.com
- Outgoing Server (SMTP) = smtp.comcast.net
- Server Name (POP) = mail.kcshadow.net
- Port = 110
- UserName = firstname.lastname@example.org
Drupal 7 Contact E-mail Bug:
There is a documented bug in D7 where you receive the error message when sending a contact email: "Unable to send e-mail. Contact the site administrator if the problem persists." To fix this I found a code change was needed in modules\contact\contact.pages.inc:
Around line 147 this code:
// Get the to and from e-mail addresses. $to = $values['category']['recipients']; $from = $values['sender']->mail;should be changed to this:
// Get the to and from e-mail addresses. $to = $values['category']['recipients']; $from = "email@example.com";