Skip to content

Instantly share code, notes, and snippets.

@leymannx
Last active November 3, 2021 12:26
Embed
What would you like to do?

Drupal 9 on a Mac

1. Download and install Docker Desktop

https://download.docker.com/mac/stable/Docker.dmg

2. Install the package manager Homebrew

Open the Terminal app and execute the following command.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

3. Install the local PHP development system DDEV

In the Terminal execute the following command.

brew tap drud/ddev && brew install ddev

4. Install Drupal

In the Terminal execute the following commands.

mkdir -p ~/Sites/foobar

cd ~/Sites/foobar

ddev config --project-type=drupal9 --docroot=web --create-docroot --composer-version=2

ddev start

yes | ddev composer create "drupal-composer/drupal-project:9.x-dev"

ddev drush -y site:install --site-name=\"Hello World\" --account-name=admin --account-pass=admin

ddev launch

Open http://foobar.ddev.site in your browser and login with username admin and password admin.

Resume your project tomorrow

Open the Terminal app and execute the following commands.

cd ~/Sites/foobar

ddev start

Open http://foobar.ddev.site in your browser and login with username admin and password admin.

@leymannx
Copy link
Author

leymannx commented Feb 11, 2020

@leymannx
Copy link
Author

leymannx commented Feb 12, 2020

Installing modules

cd ~/Sites/foobar

ddev composer require drupal/admin_toolbar

ddev drush -y en admin_toolbar_tools

Drop database and restart

cd ~/Sites/foobar

ddev drush -y site:install --site-name="\Hello World\" --account-name=admin --account-pass=admin'

ddev launch

Open http://foobar.ddev.site in your browser and login with username admin and password admin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment