Raised: $0
0% of monthly goal Help us cross the finish line!
Goal: $12,000
Raised: $0 Goal: $12,000
0% of monthly goal Help us cross the finish line!
Sponsor DDEV

add-on registry tests last commit release

DDEV DeWire

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:

  1. Download and install ProcessWire with one command.
  2. Install ProcessWire and deploy your site (prod, staging, etc.) step by step — one command.
  3. Do both at once in auto mode with minimal prompts… yep, one command.
  4. Nope, just 3.

Totally not a Fallout ripoff! See, her jumpsuit’s red

Why?

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.

Installation

ddev add-on get lemachinarbo/ddev-dewire

Guides

Use Cases

1. Installing Processwire

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

2. Set up deployment

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:

  1. Create your SSH keys (only needed once. Future setups skip this step).
ddev dw-sshkeys-gen
  1. 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.
  1. Edit the .env file, which was installed in your root (approot) by the ddev dw-install command.

  2. Create a new GitHub repository for your project (private or public, your call):

gh repo create reponame --private

  1. 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

  2. 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.

3. Install and deploy in one command

Alternatively, a harder-better-faster-stronger way to install ProcessWire and deploy an environment is to use ddev dewire:

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.


Commands

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

Credits