Installing Drupal 9 in non-default folder #3846
-
Hello, According to the drupal documentation, I need to run composer create-project --no-install drupal/recommended-project my_project Edit composer.json with the desired docroot folder name. Composer install is then executed from the my_project directory. The files created in the my_project is then copied into the directory containing the server document root directory. I get an error when I try to run ...composer create-project --no-install drupal/recommended-project my_project the error is: "Creating a "drupal/recommended-project" project at "./my_project" In VersionParser.php line 521: Could not parse version constraint /tmp/MUhdIg: Invalid version string "/tmp/MUhdIg" " So, is there a way I can in install drupal 9 in a directory other than the default "web" directory? Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
This doesn't really have anything to do with ddev, it has to do with the drupal/recommended project. Please experiment with the Drupal 9 quickstart, https://ddev.readthedocs.io/en/latest/users/cli-usage/#drupal-9-quickstart If you really have to change the "web" directory to something else, you'll have to
But the reality is... you don't want to use drupal/recommended if you don't want to use "web" as the docroot. |
Beta Was this translation helpful? Give feedback.
This doesn't really have anything to do with ddev, it has to do with the drupal/recommended project.
Please experiment with the Drupal 9 quickstart, https://ddev.readthedocs.io/en/latest/users/cli-usage/#drupal-9-quickstart
If you really have to change the "web" directory to something else, you'll have to
ddev config --project-type=drupal9 --docroot=<something> --create-docroot
ddev composer create "drupal/recommended-project" --no-install
and then edit composer.json to change "web/" to something else everywhere it appears, for example, changeweb/
todocroot/
ddev composer install
But the reality is... you don't want to use drupal/recommended if you don't w…