Search code examples
drupal-8docker-desktopddev

DDEV does not seem to be instaling drupal (was working before)


I've been using DDEV & Docker-Desktop sucessfully to run installs of drupal8 on my windows 10 machine. Today I decided to create a new install of Drupal8 (I last did this a month ago or so).

I followed the basic steps:

  1. Create new folder (drupal8test)
  2. Ran the ddev config command inside this folder.
  3. accepted the defaults and choose drupal8
  4. Amended config.yaml so the ports do not clash with others on my machine
  5. Ran the command ddev start
  6. I get a couple of alerts from docker desktop and I share folder's it needs
  7. There are no errors and the URL is provided, on going there I get a 404 file cannot be found error

When I look in the drupal8test folder I see the following folders:

.ddev drush files sites

(Expecting to see web).

Any ideas? (I'm quite new to Drupal and DDEV so I'm sure I'm doing something wrong)


Solution

  • Welcome to ddev and to Drupal, Mark! (This is updated to Drupal 10 since Drupal 8 was a long time ago.)

    ddev has never installed Drupal, it's a local development environment.

    It looks like you didn't do the required ddev composer require drupal/recommended-project.

    There are quickstarts for Drupal (all versions), TYPO3, Magento and Magento2, etc at https://ddev.readthedocs.io/en/stable/users/quickstart/

    For Drupal 10, you would follow the Drupal 10 Quickstart:

    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
    # use the one-time link (CTRL/CMD + Click) from the command below to edit your admin account details.
    ddev drush uli
    ddev launch
    

    After doing this install you can just ls and you'll see the web directory. If you're interested in running drush, you can ddev exec drush status for example, or just ddev ssh and use drush.

    Anyway, the next time you get stuck, the docs are waiting for you at https://ddev.readthedocs.io/en/stable/ and there is also lots of community support available here and elsewhere.