

Install the default BLT config splits using blt recipes:config:init:splits I would also advise setting up a few additional things at this stage: The next thing is to export your default configuration snapshot. This should run very quickly given that acquia/drupal-recommended-project and BLT 12 default to minimal. Note: since we are running Drupal VM you should vagrant ssh so you’re inside the container. I would suggest doing something like this. Once your VM is provisioned the next step is to install Drupal (single site) the first time. Warning: you do need sudo for this stage! Run vagrant up and let it run for the next 15-20 minutes. So now finally it’s time to provision the VM. There are many other tweaks to be made, but those are really only useful once we have a server. Each of your multisites will get its own BLT.yml which will be used for managing database credentials, drush aliases, etc.įinally, I defined my multisites in an array in my PROJECT level BLT.yml. Note that BLT uses the BLT.yml file to generate the local settings files.
#Drupal vm destroy all and create a site manual#
This did require a bit of manual intervention. Next, I reviewed my sites directory to make sure that all of my database settings were setup properly. I manually modified box/config.yml per Beverly’s recommendation to ensure that the drupal database user has access to all drupal databases. BLT has some extensive documentation on this command here. BLT automatically added the database config into my box/config.yml file which you can see here. So I ran blt recipes:multisite:init to define the sencond and third site that I knew I wanted. You may not “always” know what your multisites are out of the gate, but for this example I kew what I was doing.

NOTE: without addressing this, your VM will not provision. I updated to 2.9.5 (and opened to change the default value to 2.9.x). The stock version (as of ) in the BLT VM config file is 2.7.1 which isn’t compatible with PHP 7.4.1 or higher. the 7.3 that ships with BLT out of the box). Here are a few things I did…Ĭhanged the PHP version to 7.4 (vs. The next step is to start tweaking the VM config. BLT provides a recipe for this! I just did: blt recipes:drupalvm:initĪgain, when BLT asked me if I wanted to provision the VM I did not.

The next thing I did was configure my Drupal VM but I did not provision it. If there’s interest, I can post a similar tutorial for doing this with Lando in the future. composer require acquia/blt-drupal-vmĪ brief note: I have been doing a lot with Lando recently! But I am working with a customer who is already using Drupal VM, so I did this work there. composer create-project -no-interaction acquia/drupal-recommended-project multisite Here’s the command I ran to instantiate the project locally. Either will work, but the Acquia version comes pre-baked with some of the BLT stuff in it. I tend to use acquia/drupal-recommended-project over drupal/recommended-project. Obviously hosting platforms can and do support multisite platforms of this size and scale but trying to manage that many locally might be a bit challenging. I also want to give a general disclaimer that if you are planning on running a multisite platform with “hundreds or thousands” of sites, setting up a local multisite for all of those sites might not be advised. īefore I jump in, a shoutout to my colleague Beverly Lanning who has extensively documented this process over on Acquia’s Knowledge Base (and this material was very helpful as I worked through this process last week).

If you want to see the end result and/or follow along, I have created a public facing Github repository that you can look at for an example. Note: as of BLT 12 you may need to also add the plugin if you get any errors about the Multisite recipe not existing. I’ll be using the following tools in this tutorial: That’s really useful background information, but let’s take it a step farther: what if you want to experiment with Drupal 9 multisite? What if you want to take it for a whirl? Unfortunately it’s something you can just “do.” It takes a bit of effort to get everything up and running. I spent some time in late 2020 blogging about some of the planning you need to do if you want to go with Drupal multisite for your platform.
