![]() In a classic Drupal multisite architecture, the individual websites share code (the Drupal core, modules, and themes), but each website has its own database so they do not share content, configuration, or settings. We’ll be looking at four distinct implementation choices: Classic Drupal Multisite, Domain Access or Mega Site, Distribution Profile, and an offshoot of the distribution profile called Custom Upstream. In Drupal we have several ways to accomplish this, and this post will describe some architecture options that make this possible, as well as the relevant factors that can help you decide which option provides the best ‘fit’ for the implementation. Visit symetris.ca – the company that sponsored Drall’s initial development.Oftentimes projects need a way to serve multiple domains from the same installation or from the same codebase.Visit and star the Drall repository on GitHub.Use Drall on your next multi-site Drupal project.It can easily be installed with composer and it is fairly easy to use. You can then run Drush commands on all group1 sites like this: $ drall exec:drush -drall-group=group1 cron Conclusionīy allowing us to run Drush on all or multiple sites, Drall does help a lot in multi-site Drupal installations. ![]() For example, web/sites/Įach of these files define a $sites variable just like the sites.php file. If you’re not using Drush site aliases, you can still assign your sites to groups by creating sites.*.php files in Drupal’s sites directory. With this in place, you can run Drush commands on all group1 sites like this: $ drall exec:drush -drall-group=group1 deploy With sites.*.php files If you’re using site aliases in your project, you can assign site aliases to one or more groups by adding a oups key. Here’s how you can define site groups for Drall. Drall allows you to define site groups and then use the -drall-group=GROUP option to run commands on specific site groups. This is one Drall feature that I really find useful, especially when dealing with a huge number of Drupal sites in a single multi-site installation. $ drall behavior is also provided by the drush site:alias command. With drall site:aliases, you can get a list of all aliases. Say, each of these files defines 2 aliases each for 2 environments: dev, prod. Say, you have the following site aliases defined: # In your Drupal project root. The site aliases command lists all site aliases defined in your Drupal project. $ drall exec:shell "mkdir -p & drush core:rebuild" site:aliases The exec:shell added in v2.x command attempts to solve this problem. Or maybe simply execute a non-drush command on each site. Execute the drush deploy command on the site.More often than not, we need to run multiple commands on each site in a multi-site Drupal installation. You can then use in scripts to do fancy stuff. With drall site:directories, you can get a list of the site directory names. The site directories command lists all directories referred to in Drupal’s sites.php. With this method, the part represents the various site aliases you have configured for Drush. Or simply omit the and Drall adds it automatically, unless you’ve included in the command, which is discussed next. # Equivalent to running the following Drush commands. With this method, the -uri option is sent to Drush. There are a number of ways in which you can to use this command. This command allows you to execute a Drush command on: Here’s a list of drall commands that you might find useful. Usageĭrall offers a number of commands to simplify working with multi-site Drupal installations. Note: To run drall from anywhere in the terminal, you need to add composer’s vendor/bin directory to your system’s PATH variable. Drall can be installed with composer, either globally or in a specific project.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |