Installing the module
Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites
After you have prepared your server and made any edits to the default module behavior, you may install Domain Access like any other Drupal module.
If you receive a message indicating that the 'Domain failed to load' this indicates that the settings.php file has not been properly configured. Follow the instructions at Configuring settings.php.
Rebuilding Content Access Permissions
After installing the module you may be asked to rebuild the content access permissions. This is a normal part of the process when adding a node access module to an existing site.
Using Drush (Drupal 7 Only)
When installing from drush, it is proper to pass the URI value for your site. Include the full path to the installation, as below:
drush pm-enable domain --uri=http://example.com/optional_subdirectory
If your site is not installed in a subdirectory, the command would be:
drush pm-enable domain --uri=http://example.com/
Passing the --uri variable tells Domain Access what the default domain for your site will be. Without this information, the default domain cannot be created from the command line.
After installing via drush, you must rebuild the node access table. Run the command:
drush cache-clear
When prompted, select either option [1] or option [5] to rebuild node access.
After Installation
Note that as of 6.x.2.0, the primary domain is created for you on installation.
The primary domain will use the SERVER_NAME value of the request made when installing the module. This value may be edited by going to the Domains page (Drupal 7: Administration > Structure > Domains, or http://example.com/admin/structure/domain
; Drupal 6: Administer > Build > Domains, or http://example.com/admin/build/domain
) and editing the Primary Domain value.
After you install the module, you should visit the Permissions page (Drupal 7: Administration > People > Permissions, or http://example.com/admin/people/permissions
; Drupal 6: Administer > User Management > Permissions, or http://example.com/admin/user/permissions
and set the module permissions; normally you will give your site administrators the following permissions:
Drupal 7
- 'administer domain records and settings'
- 'set domain access status for all content'
Drupal 6
- 'administer domains'
- 'set domain access'
After saving permissions, go to the Domains page (Drupal 7: Administration > Structure > Domains, or http://example.com/admin/structure/domain
; Drupal 6: Administer > Build > Domains, or http://example.com/admin/build/domain
) and configure your site's Primary Domain.
For more information see Permissions
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion