
- Drupal 9 multisite install#
- Drupal 9 multisite manual#
- Drupal 9 multisite code#
- Drupal 9 multisite download#
The root site will be named drupal8multisite in our case, will be accessible at, and will be installed at /xampp / htdocs / drupal8multisite

Drupal 9 multisite install#
Recommendations followed not to download into system files as there are some firewall problems. (E.g., c:\xampp) Upload the instance Drupal 8 that will serve as the root site for our multi-site case.įor our multisite case, install a Drupal 8 instance that will serve as the root location.
Drupal 9 multisite code#
Once added the previous code lines, we will proceed to activate the module Domain access (to enable the module through Drush it will have to indicate as an argument the current default domain: drush pm-enable domain -uri = domain.Download a XAMPP on your local computer.

This will cause that when the Drupal bootstrap is loaded, the configuration of the Domain module is also loaded. '/sites/all/modules/domain/settings.inc' Before activating the module, it will be necessary to modify the Drupal settings.php (sites / default / settings.php) by adding the following code lines: /**
Drupal 9 multisite download#
We should download the module in sites / all / modules. At this moment, we can configure Drupal to have both domains running Domain access. Once completed, we will have our local server configured to serve both URLs.Īt this point, we have already our server correctly configured and, although in an unreal way, the URLs will be pointing to that server. To do this, we will open the hosts file (/ etc / hosts in ubuntu) and we will add the following lines: 127.0.0.1 domain.local

In order to see the test performance (and as we do not have a DNS server in the local environment), we will modify the hosts file so that these URLs point to our settings. The next step would be to configure the DNS server for both domain.local and subdomain.local to point to the same site. Once added these parameters, we will have to restart the web server (in this case, Apache). In order to test the configuration module correctly, the first thing to do will be to modify the created virtualhost and add the following parameters: ServerName domain.local The Domain access module (7.x-3.12) downloaded at: sites / all / modules A configured apache virtualhost pointing to the path where Drupal has been downloaded. In addition to the module configuration in Drupal, both the server serving the portal and the DNS server must be properly configured so that all URLs point to the same Drupal installation.įirst of all, we will detail the scenario where we will start from to carry out the correct module configuration: It can be like the performance of the default Drupal multisite, although in this case, we will not have different files for additional sites or databases. One of the advantages of this module is the ease of managing the configuration of the different domains, because every web portal access the same database, which can affect the overall performance of the portal site.ĭomain access functionality is based on the access to the portal through different domains, for example, if we access the domain “ ”, the determined configuration will load for that domain, and if we enter “”, a different configuration to the previous one will load. In relation to Drupal, it is directed to any public as it explains the interface procedure.
Drupal 9 multisite manual#
The audience for this manual are those people who know the DNS performance (basic knowledge). These multiple portals are obtained based on the access to the portal through different URLs, therefore, we will only have a single website to manage (as opposite to the core functionality of Drupal where we will only have one website and a single database).

The Domain access module allows us to configure Drupal in such a way that we can build multiple websites with a single core installation.
