Conversation
…arams, reduce container calls
Remove dangerous cache:rebuild before config:import that causes fatal errors on breaking schema changes (see wunderio/charts#514). Remove redundant double cache:rebuild (~15-20s saved). Remove full deploy pipeline from hook — developers run ddev drush deploy deliberately after import. Keep only drush sqlsan for all ddev import-db use cases.
Add --gzip to drush sql-dump for ~5.5x faster transfers. Add SSH -C compression as fallback. Consolidate three ddev yq calls into one (~4.8s to ~1.6s). Validate drush/sites/self.site.yml and alias upfront. Add --backup flag to create local DB backup before overwriting. Add --force flag to skip confirmation prompt. Add confirmation prompt before overwriting local database. Rename prod_ssh_* variables to remote_ssh_* (env-agnostic). Show ddev drush deploy and ddev drush uli hints after sync.
Update description to reflect any remote environment, not just production. Update examples to show new flags.
Document new syncdb flags (--backup, --force, --keep-dump). Update database management section to reflect sanitize-only hook. Add copyable markdown snippet for project READMEs. Use version-agnostic drupal project type in setup instructions. Condense Performance Optimization section (DRY/KISS). Fix period consistency, casing (PHPCS, PHPCBF), and typos.
Remove unnecessary confirmation prompts since the command is deliberately invoked by the user. Build the import-db command as an array instead of using eval, and pass --skip-hooks flag through to ddev import-db when requested. Remove post-run hints that are redundant when hooks handle deployment steps.
Merged
ragnarkurmwunder
approved these changes
Apr 6, 2026
|
Note: I did a visual review only. |
Collaborator
|
Note that this is case for very slow internet eg in Alicante. But compression is of course must have and makes thing still better! |
hkirsman
reviewed
May 21, 2026
- update setup command to use --project-type=drupalN - add note that N is the Drupal version number Refs: README.md
Contributor
There was a problem hiding this comment.
Pull request overview
This PR targets faster and safer database synchronization/import workflows for the DDEV Drupal add-on, primarily by compressing sync transfers, adding new sync flags, and revising post-import behavior/documentation.
Changes:
- Updated
syncdbto use gzip-compresseddrush sql-dump, add--backup/--keep-dump/--no-deploy, and do earlier alias validation. - Adjusted
db-post-importbehavior to sanitize and (currently) rundrush deployunless a marker file is present. - Refreshed README documentation and command descriptions to match the new
syncdbusage.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| wunderio/core/wdr-core.sh | Attempts to ensure DDEV_APPROOT is set when missing (host-side execution context). |
| wunderio/core/tooling/syncdb.sh | Adds gzip dump transfer, new flags, upfront alias checks, backup option, and marker-file-based deploy skipping. |
| wunderio/core/hooks/db-post-import.sh | Changes post-import hook to sanitize and conditionally run drush deploy. |
| README.md | Updates installation steps, syncdb docs/examples, and performance notes. |
| commands/host/wunderio-core-syncdb.sh | Updates command description and PATH initialization for host-side syncdb. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+21
to
+24
| ddev config --project-type=drupalN --docroot=web --project-name=example.com | ||
| ``` | ||
|
|
||
| where `N` is the major version of Drupal (e.g., `10` or `11`). |
When DDEV_APPROOT is derived from git or PWD, export it so child scripts inherit the variable outside the DDEV container.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket GH-46
Changes
syncdb (faster + new features)
--gzipondrush sql-dumpreduces transfer from ~18 min to ~2 min for a 629MB database-Ccompression as additional fallbackddev yqcall instead of three (~4.8s → ~1.6s)drush/sites/self.site.ymland alias — instant error with available aliases listed--backupflag — creates local DB backup before overwritingprod_ssh_*→remote_ssh_*(env-agnostic)ddev drush deployandddev drush ulidb-post-import hook
drush deployDevelopers now run
ddev syncdb prod --no-deployif they want fast import and skip drush deploy.Docs
Closes #46