Develop locally with DDEV
Run a copy of a WP Waterfall environment on your computer with DDEV. Code moves with Git, the database and uploads with the add-on. Live is read only.
The WP Waterfall DDEV add-on makes a working copy of an environment on your computer: the code from Git, plus the database and uploads. You edit in your own editor and see the site at https://NAME.ddev.site. You choose what moves each time.
| Part | How it moves | Staging and previews | Live |
|---|---|---|---|
| Code | Git, through the WP Waterfall remote | Pull and push | Pull only |
| Database | SSH, or a backup download | Pull and push | Pull only, from a backup |
| Uploads | SSH, or a backup download | Pull and push | Pull only, from a backup |
You can copy live down but never send anything back to it. To change live, push to staging and promote.
What do I need?
- Docker and DDEV 1.25 or newer. On Windows, both go inside WSL2 and Ubuntu. On Linux, Docker Engine. macOS is untested; see the limits.
- An SSH key on your WP Waterfall account. See Git access.
- An API key with
sites:read,sites:write, andbackups:write, made under Account settings, Integrations, API keys. Code and an SSH pull need onlysites:read. Live data and database pushes use a backup, which needsbackups:write. See API keys and scopes. - On your computer:
bash,curl,jq,git,tar, andgzip. Setup lists what is missing.
The API key never goes into a project file. The add-on looks for it in this order: WPWATERFALL_API_KEY in your shell, the command in WPWATERFALL_API_KEY_COMMAND (for a keychain, such as pass show wpwaterfall), the file ~/.config/wpwaterfall/api-key (mode 600), then a hidden prompt.
How do I set it up?
- On the Info tab of your site, in the Local development card, choose Download starter and unzip it into a folder.
- Open a terminal there and run
bash setup.sh(macOS and Linux) orpowershell -ExecutionPolicy Bypass -File .\setup.ps1(Windows, which needs WSL2 with Ubuntu; see Local development on Windows with WSL2). - Answer the questions. Setup asks before it changes anything.
The starter holds the DDEV settings for that environment, a README, and the two setup scripts. It holds a host, a port, and a user name, never a password or a key.
You can skip the starter. In an empty folder with a DDEV project, run:
ddev add-on get https://get.wpwaterfall.com/local.tar.gz
ddev wpwaterfall setup my-site
Add an environment name for a preview or live, such as ddev wpwaterfall setup my-site qa. The add-on keeps itself up to date (see Keep the add-on up to date), and ddev add-on remove wpwaterfall removes it.
What does setup do?
It goes through seven steps and stops at the first one that cannot work, with the exact fix.
- Checks the computer: the system, the tools above, and that Docker answers. It installs nothing.
- Ports 80 and 443, which DDEV uses so the address has no port. If a program holds one, setup names it and prints the command to stop it. See Port is already allocated.
- Browser trust. The local site opens over https only, so setup makes your browser trust DDEV's certificate. If the browser still warns, see the certificate fix.
- Your API key, asked with hidden input and checked with WP Waterfall.
- An SSH key: the one you name with
--ssh-key, or one from~/.ssh. With none, it offers to make~/.ssh/wpwaterfall_ed25519and prints the public half to add under Account settings, Integrations, SSH keys. - Links the site, writes the DDEV files, adds the Git remote, and starts DDEV.
- Pulls code, database, and uploads, rewrites addresses to your local one, and makes a local admin login.
What is the local admin login?
A pulled database has real users whose passwords you do not know. So the first database pull makes a throwaway administrator, wpwaterfall-local, that exists only locally. Its random password is shown once and kept in .ddev/wpwaterfall-local-login (mode 600, never in Git). Show it again, or open wp-admin, with ddev wpwaterfall login (add --launch to open the browser). Before a database push the add-on removes that user. ddev wpwaterfall login --create makes it again, and --no-local-admin on a pull skips it.
How do I get my API key?
Setup needs an API key to link the site and read its settings. If it finds none, it stops before it changes anything and shows these steps:
- Open my.wpwaterfall.com, then Account settings, Integrations, API keys, then Create key. Tick
sites:read,sites:write, andbackups:write, and choose a 30 day expiry. The key is shown once, so copy it then. - Give it to setup in one of three safe ways:
- Hidden prompt: run
ddev wpwaterfall setupin a terminal and paste the key. Nothing shows on screen. Setup offers to keep it in~/.config/wpwaterfall/api-key, a file only you can read, outside every project. - Shell variable, for
--yesand for an AI assistant:export WPWATERFALL_API_KEY=<your key>in the shell, then run setup. Setup never writes a key it got this way to a file. - Keychain: set
WPWATERFALL_API_KEY_COMMANDto a command that prints the key, such assecret-tool lookup service wpwaterfallorsecurity find-generic-password -s wpwaterfall -w.
- Hidden prompt: run
- Check it with
ddev wpwaterfall doctor.
Never put the key on a command line, in a file in your project, or in a chat with an assistant. Setup refuses --api-key for that reason.
No key yet? Code and the staging database work with an SSH key and Git alone. Add the public key under Account settings, SSH keys, then use git pull and git push with the wpwaterfall remote. You still need the key to link a site, read its settings, pull from live, and push the database or uploads.
Doctor and setup tell the cause in one or two sentences when something is wrong: no key, a key that lacks a scope (it names the scope), a key that was mistyped, has expired, or was revoked, an SSH key that is not on your account, ports 80 and 443 in use, or Docker not running.
Can my AI assistant set it up?
Yes, if it is connected to WP Waterfall and can run commands on your computer. You never paste a key. Say:
Set up WP Waterfall local development with DDEV for my site NAME. Use the set_up_local_development prompt.
Add "preview QA" or "live" for a copy of that environment instead of staging. The assistant checks ddev and docker, tells you in one sentence what will be copied, installs the add-on, makes an API key with only sites:read, sites:write, and backups:write that expires in 30 days (and an SSH key if none exists), runs ddev wpwaterfall setup with the key in WPWATERFALL_API_KEY for that one command, and finishes with ddev wpwaterfall doctor. Each key step asks you first. See MCP connections. Revoke the connection or the key when you are done.
With --yes, setup asks nothing and prints each choice. It reads the API key only from WPWATERFALL_API_KEY, because a key on a command line shows in the process list. A key with a passphrase cannot be used when nobody can type it. With no SSH key, setup makes one and stops before the pull until you add its public half to your account. Other flags: --no-pull, --no-local-admin, --skip-trust, and --custom-ports.
How do I add a plugin or change code?
Edit and commit locally, push to staging with git push wpwaterfall master, check the result, then promote. The whole flow is in How Git deploys work. WP-CLI cannot activate a plugin on live, so add the command to deploy.hooks in wpwaterfall.yml (for example plugin activate my-plugin) and push it with the plugin. A database or uploads change reaches live only through Copy staging into live.
Which platform notes apply?
- Windows: use WSL2 with Ubuntu and keep the project in the Linux home folder, never under
C:\. - macOS: Docker Desktop, OrbStack, or Colima, with at least 4 GB of memory. For a large site, try Mutagen:
ddev config --performance-mode=mutagen, thenddev restart. - Linux: put your user in the
dockergroup (sudo usermod -aG docker $USER) and open a new terminal.
The browser certificate and ports 80 and 443 are covered in Troubleshoot local development.
How do PHP and database versions match the server?
init reads the environment's PHP version and picks the nearest MariaDB version DDEV offers, and writes both to .ddev/config.wpwaterfall.yaml. When the server's PHP version changes, the next ddev start applies it. A new database version is only reported, with the command that switches it.
To try another PHP version locally:
ddev wpwaterfall php # shows the server's version, yours, and the choices (7.4 to 8.5)
ddev wpwaterfall php 8.3 # switch and restart DDEV
ddev wpwaterfall php --server # go back to the server's version
This does not change the server. If DDEV refuses to start with its database volume holds mariadb:11.8, see the fix.
What is the everyday flow?
- Pull what you need:
ddev wpwaterfall pull --allthe first time. - Edit the code. The project folder is a normal Git repository.
- Test at
https://NAME.ddev.site, log in withddev wpwaterfall login, and read mail in Mailpit (ddev launch -m). - Commit, then
ddev wpwaterfall push --codeto staging. The platform builds it. - Test on staging, then promote staging to live in the dashboard.
pull and push take --code, --db, --uploads, or --all, in any mix. With no flag in a terminal, the add-on asks. A pull starts with all three ticked and a push with code only. In a script you must pass a flag.
ddev wpwaterfall pull --db --uploads # fresh data, keep your code (this replaces your local database)
ddev wpwaterfall pull --db --uploads --from live # reproduce a bug with production data, from a backup
ddev wpwaterfall push --code # send your commits to staging
What a pull brings, and what it leaves alone, is in Pull code, a database, and uploads. Pushing data, or only some tables, is in Push a database or uploads to staging. Code moves by plain Git: see Git access.
Keep the add-on up to date
Each ddev start and ddev restart checks for a newer add-on and for new settings from WP Waterfall, and applies them. You see one line in the start output, such as WP Waterfall: Updated: add-on 0.5.0 to 0.5.1; PHP 8.3 to 8.4; restarted. or WP Waterfall: Up to date (add-on 0.5.0). A check takes a second or two.
- Offline, the start prints
WP Waterfall: offline, update check skipped.and goes on. - If an update fails, the start still goes on, and one line says what failed and to run
ddev wpwaterfall update. - A new add-on is downloaded over https, and its signature is checked with
opensslbefore anything is unpacked or installed. WP Waterfall signs every release, and the add-on carries the public key. If the signature is missing or wrong, or your computer has no workingopenssl, nothing is installed, the add-on you have stays, and one line says why. It never goes back to an older version. An add-on older than 0.6.0 cannot check signatures, so it takes 0.6.0 by its checksum, and every update after that is checked. - New settings it applies by itself: the PHP version (unless you chose one with
ddev wpwaterfall php), the SSH address and host key, the Git remote, and the web root. When one of them needs it, DDEV restarts once.
Run it by hand any time:
ddev wpwaterfall update # this project
ddev wpwaterfall update --check # only show what would change
ddev wpwaterfall update --all # every DDEV project on this computer that has the add-on
A run by hand asks before it restarts DDEV, and --yes restarts without asking. --all prints one line per project and never starts a stopped project. It also updates projects on an add-on from before this command existed.
It never touches your database, code, or uploads, and it never changes these by itself. It prints the command instead:
- New subsites on a network:
ddev wpwaterfall pull --db. The address map changes only with a database pull. - A single site that became a network, or a new network type:
ddev wpwaterfall init --refresh, thenddev wpwaterfall pull --db. - A new database engine or version:
ddev wpwaterfall init --refresh, which offers to switch the database and snapshots one with tables first. - A new table prefix: a database pull uses the server's real prefix, and
ddev wpwaterfall init --refreshrecords the new one.
To turn the update on start off, set WPWATERFALL_AUTO_UPDATE=off in your shell. It is also off when CI is true and when you installed the add-on from a folder on your computer. ddev wpwaterfall doctor says whether it is on.
What are the commands?
Run ddev wpwaterfall --help for the same list.
| Command | What it does |
|---|---|
setup [SITE [ENVIRONMENT]] |
The whole setup above. Flags: --yes, --ssh-key PATH, --no-pull, --custom-ports, --skip-trust, --no-local-admin. |
init [SITE [ENVIRONMENT]] |
Link the project to an environment and write settings. With no site it lists your sites. Flags: --refresh, --api-url URL, --yes. |
pull |
Copy parts down. Flags: --code, --db, --uploads, --all, --from ENV, --method ssh|backup, --fresh-backup, --rebase, --disable-dropins, --max-size 50M, --uploads-days N, --bwlimit 5M, --no-local-admin, --sanitize, --sanitize-profile minimal|full. |
push |
Send parts to staging or a preview. Flags: --code, --db, --uploads, --all, --to ENV, --yes, --max-size 50M, --bwlimit 5M, --tables LIST, --allow-sensitive. |
code |
Follow the environment's branch. --release live checks out live's commit. --rebase rebases your commits. |
login |
Show the local admin login. --launch opens wp-admin, --create makes the login if missing. |
php |
Show or switch the local PHP version. |
trust |
Make the browser trust DDEV's certificate. --check only reports. |
status |
What the project is linked to, and whether WP Waterfall's settings changed. |
doctor |
Check the computer, connection, and site. Flags: --login, --fix, --yes, --custom-ports. |
exclude list|add PATTERN|remove PATTERN |
Your own upload patterns to skip. |
update |
Install a newer add-on and apply new settings. It also runs on every start. Flags: --check, --yes, --all. |
version |
The add-on version. |
Exit codes: 0 done, 1 a step failed, 2 usage, 3 not signed in, 4 refused, 5 a transfer or check failed, 6 not found. DDEV prints error=exit status N and exits 1 for a failed host command, where N is the add-on's code.
What are the requirements and limits?
- WP Waterfall serves the add-on from
https://get.wpwaterfall.com/local.tar.gz, not the DDEV registry, soddev add-on updateskips it andddev wpwaterfall updatedoes the job. To pin a version, use a file such aslocal-0.6.0.tar.gzfrom the same address and setWPWATERFALL_AUTO_UPDATE=off. Its SHA-256 is next to it with.sha256on the end, and its signature with.sig. Only the newest version stays on the server: keep the file you downloaded if you pin one. - The add-on is tested on Linux and on Windows with WSL2 (Docker Engine). Docker Desktop, macOS, and arm64 Linux are untested. Windows without WSL2 and Local by WP Engine are not supported.
- When WP Waterfall reports no SSH host key fingerprint, the first connection trusts the host and pins it from then on.
API
GET /v1/environments/{id}/local-dev: the settings the add-on reads. It holds no secret.POST /v1/environments/{id}/local-dev/pull-sessionand.../push-session: record a pull or push in the activity log and return the plan.POST /v1/environments/{id}/backups,POST /v1/backups/{id}/download, andPOST /v1/backups/{id}/download-link: how live data reaches your computer.
The MCP server offers get_local_dev_config (read only) and the prompt set_up_local_development. On a connection you approved, create_api_key, list_api_keys, revoke_api_key, list_ssh_keys, add_ssh_key, and remove_ssh_key do the key steps, each in two steps.
Still stuck?
Email support at wpwaterfall dot com with your site name and what you tried, or send us a message.