Ten more ways to increase your efficiency with DDEV
March 25, 2020 3 min read
Sometimes as the releases go by not everybody ends up noticing new features in DDEV. People liked it the last time we did a “remember these simple new features” article, so here comes another one:
- Built-in docs: Never forget you can just type
ddev
(which shows all available commands) andddev help <command>
. Those are generally faster than searching the docs any time. ddev launch
is pretty nifty. It works on most platforms, and opens a web browser to the current project. You can also add a URI, likeddev launch /admin/reports/status/php
ddev snapshot
does a very fast save of your database. I like to use it with a name, for exampleddev snapshot --name=before_phase2_upgrade
so that I can remember what in the world it was about (and useddev restore-snapshot before_phase2_upgrade
to restore it). Otherwise it just gets a date/timestamp (docs).ddev mysql
launches the MySQL client in the db container and lets you interact with it, so you can do anything you might usually do with MySQL. And you don’t need to have the MySQL client installed on your local machine. I mostly use the interactive mode, but also withddev mysql -uroot -proot
to use root privileges, orecho "SHOW TABLES;" | ddev mysql
ddev share
is a wonderful way to show off your work to a collaborator or client. You just need ngrok (even without a login, even without a paid account) and you can look at your project together with somebody else anywhere in the world.- HTTPS: Are you getting the most out of DDEV’s HTTPS support? It was the most popular feature of 2019 in our recent survey about favorite features. Run
ddev poweroff && mkcert -install
and you’ll have trusted local HTTPS URLs in most browsers (and the HTTP URLs still work fine too). - NFS: If you’re on macOS or Windows and not yet using NFS to mount files into the container, you’ll find it provides better performance by quite a bit, and also provides more consistent server-like behavior than Docker mounts do on macOS or Windows.
- Custom Commands are amazingly easy to create. Does your team have a workflow that isn’t built into DDEV? Add a custom command – it’s just a simple shell script. The ddev-contrib repository has a number of custom command examples as well.
- Updating: Are you updating DDEV the easy way? Homebrew for macOS and Linux and Chocolatey for Windows make it pretty painless.
ddev poweroff && brew upgrade ddev
,ddev poweroff && choco upgrade -y ddev
Recommended! (docs) (Note that we also maintain the ddev-bin AUR repository for ArchLinux/Manjaro users). - FAQ: Have you glanced at the FAQ lately? We’d love to hear about new things you would like to see there or anywhere in our docs, just hit us up on any of our support channels.
Take a look at my own favorite commands and see if you’re using them all. Is there anything we should add there? Give us a shout on Twitter!
Posted In