Setting up Drupal 9 and Drupal 10 development environments
This documentation needs work. See "Help improve this page" in the sidebar.
We strongly encourage all Drupal 10 porting events participants to come prepared to save their and mentors time on basic preparation tasks. The recommendation is to have two clean development environments ready before the event starts:
- Development environment with Drupal 10 installed
- Development environment with Drupal 9 installed (9.5.x-dev is recommended to have all latest deprecations)
For non-developers / testers we suggest using the cloud-based environment DrupalPod which does not require installation on the local machine. For beginner developers, we suggest starting with DDEV as a local development environment.
For all others - use any development environment of your choice and run Composer & Drush commands from the instructions below by removing ddev suffix.
Set up DDEV or DrupalPod
It is recommended to use DrupalPod for your first contribution or if you do not want to install any software. This should take approximately 5-10 minutes.
- Click the DrupalPod link above.
- Click the DrupalPod logo on the GitHub page.
- Choose the Continue with GitHub option.
- You can find all previously created environments in the Gitpod dashboard.
Before proceeding to the next steps, decide if you want to install DDEV on your local machine or run it in the DrupalPod service.
For the local DDEV option, find installation instructions for your operating system in the official documentation.
All ddev commands below can be used in both systems.
If you don't use DDEV/DrupalPod, you should still be able to follow the instructions and run the necessary Composer & Drush commands.
Set up a local Drupal 10 site
Create a new folder drupal10 on your local machine or create a new DrupalPod environment by clicking the green "Gitpod" button here.
Run the following commands in the terminal:
ddev config --docroot web --project-type drupal10 --create-docroot --php-version 8.1ddev startddev composer create drupal/recommended-project:^10@beta-
ddev composer require drush/drush cweagans/composer-patches mglaman/composer-drupal-lenient -
Optional. Apply the following fix for Drush. Otherwise, Drush will throw errors.
-
Install standard Drupal site by running
ddev drush site:install --account-pass=admin
If you skipped the step above, Drush will throw an error. It's safe to ignore the error and proceed to the next step. -
Go to the site using
ddev launchand ensure the site works. -
Log in with username admin and password admin.
If the site got broken, you can reinstall it by re-running commands 6 & 7.
Set up a local Drupal 9.5 site
Create a new folder drupal9 on your local machine or create a new DrupalPod environment by clicking the green "Gitpod" button here.
Run the following commands in the terminal:
ddev config --docroot web --project-type drupal9 --create-docroot --php-version 8.1ddev startddev composer create drupal/recommended-project:9.5.x-dev
- Install required dev dependencies for the Upgrade Status module:
ddev composer require -W --dev drupal/core-dev:9.5.x-dev
-
ddev composer require drush/drush cweagans/composer-patches drupal/upgrade_status -
Install standard Drupal site by using
ddev drush site:install --account-pass=admin -
Go to the site with
ddev launchand ensure the site works. -
Log in with username admin and password admin.
-
Install Upgrade Status to assess the modules:
ddev drush install upgrade_status
If the site got broken, you can reinstall it by re-running commands 6 & 7.
Next steps
Pick a contribution path and get started!
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion