Menu

1 / 2

SQL Sync for DDEV: Drush-Style Database Sync for Any SSH Server

Drupal.org aggregator·about 18 hours ago
#lidQXnaN
#planetdrupal#ddev#dump#server#sync
Long article (2585 words) — no AI summary yet.
Reading 0:00
15s threshold

Anyone who has worked with Drupal knows this command:

drush sql-sync @prod @self

One command, and the local site has a copy of the production database.

I use Drush a lot, so I wanted the same thing for my personal projects. They are Laravel, WordPress and plain PHP sites, and they live on all sorts of hosting: shared accounts, VPSs, dedicated boxes — a good number of them running cPanel, which itself runs on shared and dedicated hosting alike. What I had instead was the usual mix of phpMyAdmin exports and one-off scripts that I had to remember each time.

DDEV does have pull providers. The ready-made ones are for hosted platforms like Pantheon and Acquia, but the examples it ships also include an rsync one, for pulling a dump down from a plain server over SSH. I do not want to overstate the gap: that example works. But it is a starting point you adapt, not a finished tool. Every project needs its own provider file, written and kept up to date separately, and sanitize is on you.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.