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:
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
ddev dw-install
Installs ProcessWire. No prerequisites required.
mkdir myproject
cd myproject
ddev config --auto
ddev add-on get lemachinarbo/ddev-dewired
ddev dw-install
ddev 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:
ddev dw-sshkeys-gen
gh auth login # Select `id_github.pub` as your public SSH key when prompted.
Edit the .env
file, which was installed in your root (approot) by the ddev dw-install
command.
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 access
add your repository, and under Repository permissions
add Read/Write access for actions
, contents
, deployments
, secrets
, variables
, and workflows
. Copy the token in the .env
file in this line CI_TOKEN=xxxx
Run the deployments script:
ddev dw-deploy
Once 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
:
.env
file.CI_TOKEN
variable in your .env
file.And then just run:
ddev dewire
Be 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 |