Plugins
The plugins command group lets you track installed WordPress plugins as a manifest in loopress.json. Once committed, any environment can be brought to the same set of installed, active plugins with a single command.
How it works
Section titled “How it works”Loopress stores managed plugins under the plugins key in loopress.json:
{ "plugins": { "woocommerce": "latest", "contact-form-7": "latest" }}The keys are WordPress.org plugin slugs. Installs and activations go through WordPress’s own wp/v2/plugins REST API, which only ever installs the current stable release, so there is no version to pin, the value is always "latest".
Need a specific, reproducible version instead? Manage that plugin through Composer and wpackagist - see the composer command group. Composer-managed plugins are automatically skipped by plugin pull/plugin push.
Commands
Section titled “Commands”lps plugin add
Section titled “lps plugin add”Add a WordPress.org plugin to loopress.json.
lps plugin add <slug>| Argument | Description |
|---|---|
slug |
WordPress.org plugin slug (e.g. woocommerce) |
| Flag | Description |
|---|---|
--dry-run / -d |
Show what would be written without touching loopress.json |
lps plugin add woocommercelps plugin add contact-form-7 --dry-runNeed to manage a Composer package instead? See the composer command group - Composer-managed plugins are automatically skipped by plugin pull/plugin push.
lps plugin pull
Section titled “lps plugin pull”Snapshot the plugins currently installed on WordPress into loopress.json.
lps plugin pull| Flag | Description |
|---|---|
--dry-run / -d |
Show what would be written without making changes |
Loopress merges the remote state into the existing manifest; new plugins are added.
Example output:
Pulling plugins from https://example.comWrote 4 plugins to loopress.json + Added: contact-form-7, yoast-seolps plugin push
Section titled “lps plugin push”Sync the plugins on WordPress to match loopress.json.
lps plugin push| Flag | Description |
|---|---|
--dry-run / -d |
Show what would change without making any changes |
Before making any change, the command prints a diff:
- To install — plugins in the manifest that are not on the site
- To activate — plugins installed but not yet active
Missing plugins are installed and activated automatically.
Example output:
Pushing plugins to https://example.com
To install (1): + contact-form-7
Installing contact-form-7... ✓ contact-form-7 installed and activatedTypical workflow
Section titled “Typical workflow”# 1. Capture the current state from your reference environmentlps project switch # select productionlps plugin pull
# 2. Commit the manifestgit add loopress.json && git commit -m "chore: track managed plugins"
# 3. Apply to another environmentlps project switch # select staginglps plugin pushDry run
Section titled “Dry run”All three commands accept --dry-run (-d). Use it to preview changes before committing:
lps plugin pull --dry-runlps plugin push --dry-runlps plugin add yoast-seo --dry-run