ddev-drupal-core-dev icon indicating copy to clipboard operation
ddev-drupal-core-dev copied to clipboard

Unable to re-install Drupal without deleting project

Open andy-blum opened this issue 8 months ago • 5 comments

After installing once, running ddev drupal install standard yields:

Drupal is already installed. If you want to reinstall, remove sites/default/files and sites/default/settings.php.

I'm able to delete these, but after running the command again, I get the same message and a .sqlite file appears in sites/default/files. It seems the only way to re-install drupal is to run ddev delete --omit-snapshot and then re-install in a fresh database.

Image

andy-blum avatar May 02 '25 17:05 andy-blum

@andy-blum did you omit the mysql database when setting up?

justafish avatar May 29 '25 15:05 justafish

I've run the steps outlined in the readme

git clone https://git.drupalcode.org/project/drupal.git drupal
cd drupal
ddev config --omit-containers=db --disable-settings-management
ddev composer install
ddev add-on get justafish/ddev-drupal-core-dev

andy-blum avatar May 29 '25 15:05 andy-blum

how did you delete them? can you try the ddev drupal uninstall command?

justafish avatar May 31 '25 11:05 justafish

I had been using rm -rf sites/default/files and rm sites/default/settings.php as suggested by the drupal install command. I tried doing a fresh setup this morning to try ddev drupal uninstall but wasn't able to get a project up due to the below:

Failed to start drupal: docker-compose build failed: composeCmd failed to run 'COMPOSE_PROJECT_NAME=ddev-drupal docker-compose -f /Users/andy/Sites/drupal/.ddev/.ddev-docker-compose-full.yaml --progress=plain build', action='[--progress=plain build]', err='exit status 1', stdout='#0 building with "default" instance using docker driver

Full output here

andy-blum avatar May 31 '25 17:05 andy-blum

but wasn't able to get a project up due to the below

@justafish,

ARM64 support was unintentionally removed in:

  • #58

I'm not sure why this change was made, but if it needs to be done, update web-build/Dockerfile.chromium with:

#ddev-generated
ARG TARGETARCH
RUN (apt-get update || true) \
  && apt-get remove chromium* -y \
  && wget https://ftp.debian.org/debian/pool/main/c/chromium/chromium_136.0.7103.113-1~deb12u1_${TARGETARCH}.deb \
  && wget https://ftp.debian.org/debian/pool/main/c/chromium/chromium-common_136.0.7103.113-1~deb12u1_${TARGETARCH}.deb \
  && wget https://ftp.debian.org/debian/pool/main/c/chromium/chromium-driver_136.0.7103.113-1~deb12u1_${TARGETARCH}.deb \
  && apt-get install ./chromium*.deb -y \
  && apt-mark hold chromium chromium-common chromium-driver \
  && rm -f chromium*.deb

stasadev avatar Jun 02 '25 09:06 stasadev