You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.2 KiB

ddev commands

1. Create a project folder and move into it

mkdir ~/drupal-theme-dev && cd ~/drupal-theme-dev

2. Configure DDEV for Drupal (PHP 8.3 is best for both Drupal 10 and 11)

ddev config --project-type=drupal --php-version=8.3 --docroot=web

3. Start the containers

ddev start

Install the recommended Drupal 11 project

ddev composer create "drupal/recommended-project:^11" --no-install

Move into the web directory and install dependencies

cd web ddev composer install

Install the site (quick standard install)

ddev drush site:install standard --account-name=admin --account-pass=admin -y

Open the site in your browser

ddev launch

ddev start # Start the environment ddev stop # Stop it ddev launch # Open site in browser ddev drush cr # Clear caches (very frequent for theme work) ddev drush uli # Get one-time login link ddev composer require ... # Add modules/themes ddev npm install # If your theme uses npm/Vite/Webpack ddev logs -f # Watch logs ddev ssh # Shell into the web container if needed