Simplify ProcessWire deployments with a single DDEV command.
DeWire installs ProcessWire and uses GitHub as your deployment control center, automating environment deployments (prod, dev, staging…) from a single source of truth.
With DeWire you can do 3 things:
- Download and install ProcessWire with one command.
- Install ProcessWire and deploy your site (prod, staging, etc.) step by step — one command.
- Do both at once in auto mode with minimal prompts… yep, one command.
- Nope, just 3.
After reading the RockMigrations Deployments guide, I loved finally being able to publish/update a website with just a commit; that was a game changer for someone still using FTP. But wiring it all up the whole thing —ProcessWire, modules, repo, secrets, workflows, keys— was a time sucker.
DeWire builds on that idea, cutting the manual steps so your project is multi-environment deploy–ready from the start.
ddev add-on get lemachinarbo/ddev-dewire- How to Install Processwire from zero
- How to customize Processwire installation
ddev dw-install Installs ProcessWire. No prerequisites required.
mkdir myproject
cd myproject
ddev config --auto
ddev add-on get lemachinarbo/ddev-dewired
ddev dw-installddev dw-deploy Automates deployment to production, staging, or dev. Requires GitHub CLI, SSH keys, a personal access tokenm and a .env file.
To enable GitHub deployments, do a quick one-time setup:
- Create your SSH keys (only needed once. Future setups skip this step).
ddev dw-sshkeys-gen- Install the GitHub CLI and, once installed, authenticate by running (also a one-time setup):
gh auth login # Select `id_github.pub` as your public SSH key when prompted.-
Edit the
.envfile, which was installed in your root (approot) by theddev dw-installcommand. -
Create a new GitHub repository for your project (private or public, your call):
gh repo create reponame --private
-
Create a Personal Access Token. Under
Repository accessadd your repository, and underRepository permissionsadd Read/Write access foractions,contents,deployments,secrets,variables, andworkflows. Copy the token in the.envfile in this lineCI_TOKEN=xxxx -
Run the deployments script:
ddev dw-deployOnce the installer finishes, update your web server configuration (using your hosting control panel) to point the docroot to current. For example, instead of /var/www/html, set your website root to /var/www/html/current to make your site visible.
Alternatively, a harder-better-faster-stronger way to install ProcessWire and deploy an environment is to use ddev dewire:
- Complete the
.envfile. - Create the repo and Personal Access Token with the right permissions, then copy it to the
CI_TOKENvariable in your.envfile.
And then just run:
ddev dewireBe aware that to run this command you have to be sure your system already has GitHub CLI installed and authenticated (check steps one and two in Set up deployment).
Tip
Once you know what you are doing, using ddev dewire PROD --lazy gives you a faster, almost zero-prompts deployment.
PROD is the name of the environment you defined on your .env file. Check the dewire command docs.
Nice. Time to enjoy some cake.
Tip
Check the commands documentation for a detailed overview of what happens under the hood each time you run a command.
| Command | Description |
|---|---|
| ddev dewire | Installs ProcessWire and automates publishing your site to production, staging, or dev with GitHub Actions |
| ddev dw-config-split | Split config.php into config-local.php for a selected environment |
| ddev dw-db-import | Import a database dump into the current environment |
| ddev dw-deploy | Automate all setup and deployment steps for publishing your site to any environment |
| ddev dw-gh-env | Automate setup of GitHub Actions repository variables and secrets |
| ddev dw-gh-workflow | Generate GitHub Actions workflow YAMLs for each environment/branch pair |
| ddev dw-git-remote | Manage git remotes for deployment |
| ddev dw-install | Install and bootstrap ProcessWire project |
| ddev dw-sshkeys-gen | Generate personal and project SSH keys if they do not exist |
| ddev dw-sshkeys-install | Register personal and project SSH keys on a remote server and test authentication |
| ddev dw-sync | Sync files to the selected environment's server using rsync |
| ddev dw-transform | Transform files or configuration for deployment |
| ddev rs | Shortcut to run RockShell 🤍 inside the web container |
- Contributed and maintained by @lemachinarbo
- Inspired by the lovely modules from @BernhardBaumrock
- Using MoritzLost's processwire.dev structure
- By the grace of Ryan Cramer for creating ProcessWire
- Powered by DDEV, which makes local dev painless