@wp-operations/wp-ops
v0.16.12
Published
The wp-operations tool. One install gives the platform and wp-ops, wp-app, wp-ide and wp-code.
Maintainers
Readme
@wp-operations/wp-ops
Install
npm install -g @wp-operations/wp-opsNeeds Node.js 20.10+, git, and Composer for plugins.
This gives four commands: wp-ops, wp-app (zero-config local WordPress/ClassicPress dev CLI on php-wasm), wp-ide (browser editor), wp-code (coding agent).
Start a project
wp-ops init my-project
cd my-project
wp-ops startOpen http://localhost:8881 and sign in with admin / password.
Commands
| Command | What it does |
|---|---|
| wp-ops init [dir] | Creates the project: app/ (the platform), platform.json, .github/app.json, app folders, packages/, workflows, git. |
| wp-ops start | Runs the platform locally on the latest WordPress. |
| wp-ops start --wp=6.8 | Runs a chosen WordPress version. --wp=classicpress runs the latest ClassicPress. |
| wp-ops start <app folder> | Runs one app instead of the platform. |
| wp-ops update | Updates app/ to the platform in your wp-ops version. |
| wp-ops new app <folder> <name> | Creates an app. |
| wp-ops new plugin <vendor/name> | Creates a plugin in packages/. |
| wp-ops apps | Lists the apps. |
| wp-ops plugins | Lists the plugins and which apps use them. |
| wp-ops composer add --apps=<app> --packages=<plugin> | Adds a plugin to an app. remove and update work the same way. |
| wp-ops sandbox | Runs every app as its own site, for the platform's previews. |
| wp-ops edit | Opens the browser editor for this project. |
| wp-ops doctor | Checks the machine and the project. |
| wp-ops | Opens a menu. |
Site data stays in .local/, which is not committed.
Deploy
Pushing to main deploys:
deploy-platform.yml:app/to the platform server.deploy-apps.yml: each changed app to its server.
Set these secrets on GitHub (Settings → Secrets and variables → Actions):
| Secret | Value |
|---|---|
| SERVERS | [{"name": "…", "ip": "…", "user": "…", "port": 22}] |
| SSH_PRIVATE_KEY | One key for every server. Add its public key to each server. |
Sandbox
SANDBOX_TOKEN=… wp-ops sandbox --port=8080 --url=https://sandbox.example.com --git- Serves each app at
/<folder>/<app>/. --url: the public address the platform loads previews from.--git: follows each app'splatform/<app>branch.- Set the same
SANDBOX_TOKENin the platform under Settings → Operations → Sandboxes.
License
GPL-2.0-or-later.
