How to install a specific version of Drupal using composer

When you are migrating a site from a legacy install of Drupal to a composer-based one, sometimes it is easiest to just get a new install running, add all of the modules using composer, then importing to the database so that Drupal just “wakes up” without realizing anything has changed.

To install a specific version of Drupal in the current (empty) directory, just run:

composer create-project drupal/drupal:8.6.10 .

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.