copy/paste instant Drupal 10 environment on MacOS with DDEV
Prerequisite - you'll need Docker installed.
Install DDEV if needed:
brew install drud/ddev/ddev
brew upgrade ddev
mkcert -install
Create your site:
mkdir my-drupal10-site
cd my-drupal10-site
ddev config --project-type=drupal10 --docroot=web --create-docroot
ddev start
ddev composer create drupal/recommended-project
ddev composer require drush/drush
ddev drush site:install --account-name=admin --account-pass=admin -y
ddev drush uli
ddev launch
A quick rundown of the above:
mkdir my-drupal10-site
andcd my-drupal10-site
create a folder on your machine for the project to live in and drops you into itddev config --project-type=drupal10 --docroot=web --create-docroot
creates ddev config for a Drupal 10 installation with the docroot living in /webddev start
fetches/starts all the Docker containersddev composer create drupal/recommended-project
gets Drupal core filesddev composer require drush/drush
gets Drushddev drush site:install --account-name=admin --account-pass=admin -y
installs Drupal with a user/password of admin/adminddev drush uli
outputs a one-time admin login URL if you want to get in that wayddev launch
launches the site in your default browser
Subsequent runs:
ddev start