A similar question was asked for Drupal 7: Add a block to a region using drush.

However, as far as I can see, this feature is not available in newer versions of Drupal. Looking at the Drush Extras module, it appears to only be available for Drupal 7.x.

How can I use Drush to add a block to a region in Drupal 9.x?

  • Why do you want to do this? – sonfd Sep 9 at 2:36
  • I have a dockerised development environment and it's useful to script the setup of my website so I can test changes, break things, etc. – quant Sep 9 at 3:09
  • I'd solve this with config. Provide some dummy config from either a module that gets imported upon module installation or use the --existing-config option when installing the site. – leymannx Sep 9 at 5:58
  • @leymannx thanks for the suggestion, I'll look into that. – quant Sep 9 at 6:51
  • @quant does this answer your question drupal.stackexchange.com/questions/266049/… – miststudent2011 Sep 10 at 0:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.