https://github.com/lemachinarbo/ddev-dewire
Installs ProcessWire and deploys your site to production, staging, or any environment.
https://github.com/lemachinarbo/ddev-dewire
ddev-get deployment-automation processwire rockmigrations rockshell
Last synced: 21 days ago
JSON representation
Installs ProcessWire and deploys your site to production, staging, or any environment.
- Host: GitHub
- URL: https://github.com/lemachinarbo/ddev-dewire
- Owner: lemachinarbo
- License: apache-2.0
- Created: 2025-07-09T02:50:04.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-07-23T21:58:25.000Z (7 months ago)
- Last Synced: 2025-07-23T23:25:47.359Z (7 months ago)
- Topics: ddev-get, deployment-automation, processwire, rockmigrations, rockshell
- Language: Shell
- Homepage:
- Size: 236 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://addons.ddev.com)
[](https://github.com/lemachinarbo/ddev-dewire/actions/workflows/tests.yml?query=branch%3Amain)
[](https://github.com/lemachinarbo/ddev-dewire/commits)
[](https://github.com/lemachinarbo/ddev-dewire/releases/latest)
# DDEV DeWire
*Simplify ProcessWire deployments with a single DDEV command.*
DeWire installs [ProcessWire](https://github.com/processwire/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](#1-installing-processwire) with one command.
2. Install ProcessWire *and* [deploy your site](#2-set-up-deployment) (prod, staging, etc.) step by step — one command.
3. [Do both at once](#3-install-and-deploy-in-one-command) in auto mode with minimal prompts… yep, one command.
4. Nope, just 3.

## Why?
After reading the [RockMigrations Deployments guide](https://www.baumrock.com/en/processwire/modules/rockmigrations/docs/deploy/#update-config.php), 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
```bash
ddev add-on get lemachinarbo/ddev-dewire
```
## Guides
- How to [Install Processwire](https://github.com/lemachinarbo/ddev-dewire/wiki/(How-to)-Install-Processwire) from zero
- How to [customize Processwire installation](https://github.com/lemachinarbo/ddev-dewire/wiki/(How-to)-Install-Processwire#customizing-your-installation)
## Use Cases
### 1. Installing Processwire
`ddev dw-install` *Installs ProcessWire. No prerequisites required.*
```bash
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*).
```sh
ddev dw-sshkeys-gen
```
2. Install the [GitHub CLI](https://github.com/cli/cli#installation) and, once installed, authenticate by running (*also a one-time setup*):
```sh
gh auth login # Select `id_github.pub` as your public SSH key when prompted.
```
3. Edit the `.env` [file](https://raw.githubusercontent.com/lemachinarbo/ddev-compwser/dev/compwser/templates/.env.example), which was installed in your root (approot) by the `ddev dw-install` command.
2. Create a [new GitHub repository](https://github.com/new) for your project (private or public, your call):
```sh
gh repo create reponame --private
```
5. Create a [Personal Access Token](https://github.com/settings/personal-access-tokens). 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`
6. Run the deployments script:
```sh
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`:
- Complete the `.env` file.
- Create the repo and Personal Access Token with the right permissions, then copy it to the `CI_TOKEN` variable in your `.env` file.
And then just run:
```sh
ddev dewire
```
Be aware that to run this command you have to be sure your system already has [GitHub CLI](https://github.com/cli/cli#installation) installed and authenticated (check steps one and two in [Set up deployment](#2-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](https://github.com/lemachinarbo/ddev-dewire/wiki/dewired#usage).
Nice. Time to enjoy some [cake](https://en.wikipedia.org/wiki/The_cake_is_a_lie).
---
## Commands
> [!TIP]
> Check the [commands documentation](https://github.com/lemachinarbo/ddev-dewire/wiki) for a detailed overview of what happens under the hood each time you run a command.
| Command | Description |
| ------- | ----------- |
| [ddev dewire](https://github.com/lemachinarbo/ddev-dewire/wiki/dewire) | Installs ProcessWire and automates publishing your site to production, staging, or dev with GitHub Actions |
| [ddev dw-config-split](https://github.com/lemachinarbo/ddev-dewire/wiki/dw%E2%80%90config%E2%80%90split) | Split `config.php` into `config-local.php` for a selected environment |
| [ddev dw-db-import](https://github.com/lemachinarbo/ddev-dewire/wiki/dw%E2%80%90db%E2%80%90import) | Import a database dump into the current environment |
| [ddev dw-deploy](https://github.com/lemachinarbo/ddev-dewire/wiki/dw%E2%80%90deploy) | Automate all setup and deployment steps for publishing your site to any environment |
| [ddev dw-gh-env](https://github.com/lemachinarbo/ddev-dewire/wiki/dw%E2%80%90gh%E2%80%90env) | Automate setup of GitHub Actions repository variables and secrets |
| [ddev dw-gh-workflow](https://github.com/lemachinarbo/ddev-dewire/wiki/dw%E2%80%90gh%E2%80%90workflow) | Generate GitHub Actions workflow YAMLs for each environment/branch pair |
| [ddev dw-git-remote](https://github.com/lemachinarbo/ddev-dewire/wiki/dw%E2%80%90git%E2%80%90remote) | Manage git remotes for deployment |
| [ddev dw-install](https://github.com/lemachinarbo/ddev-dewire/wiki/dw%E2%80%90install) | Install and bootstrap ProcessWire project |
| [ddev dw-sshkeys-gen](https://github.com/lemachinarbo/ddev-dewire/wiki/dw%E2%80%90sshkeys%E2%80%90gen) | Generate personal and project SSH keys if they do not exist |
| [ddev dw-sshkeys-install](https://github.com/lemachinarbo/ddev-dewire/wiki/dw%E2%80%90sshkeys%E2%80%90install) | Register personal and project SSH keys on a remote server and test authentication |
| [ddev dw-sync](https://github.com/lemachinarbo/ddev-dewire/wiki/dw%E2%80%90sync) | Sync files to the selected environment's server using rsync |
| [ddev dw-transform](https://github.com/lemachinarbo/ddev-dewire/wiki/dw%E2%80%90transform) | Transform files or configuration for deployment |
| [ddev rs](https://github.com/lemachinarbo/ddev-dewire/wiki/rs) | Shortcut to run RockShell 🤍 inside the web container |
## Credits
- Contributed and maintained by [@lemachinarbo](https://github.com/lemachinarbo)
- Inspired by the lovely modules from [@BernhardBaumrock](https://github.com/BernhardBaumrock/)
- Using [MoritzLost](https://github.com/moritzlost)'s [processwire.dev structure](https://github.com/MoritzLost/ProcessWireDev/blob/master/site/02-setup-and-structure/02-integrate-composer-with-processwire.md)
- By the grace of [Ryan Cramer](https://github.com/ryancramerdesign) for creating ProcessWire
- Powered by [DDEV](https://github.com/drud/ddev), which makes local dev painless