Replace local project with backup

✅ 1. Stop the project first

ddev stop

✅ 2. Clean the project directory (files)

rm -rf ~/projects/projectname/*
check if .ddev is still present
ls -a

✅ 3. Extract production files

unzip /mnt/d/drupal/sites/CUST/customer/projectname.zip -d ~/projects/projectname

✅ 4. Start DDEV

ddev start

✅ 5. Import the production database

ddev import-db --file=/mnt/d/drupal/sites/CUST/customer//projectname.sql

✅ 6. Rebuild dependencies (important!)

rm -rf vendor
ddev composer install

✅ 7. Clear Drupal caches (mandatory)

ddev drush cr

Tags