CLI
The composer command group lets you synchronize your Composer setup with a WordPress server. This is useful when you manage PHP dependencies locally (or with Loopress Full) and need to keep remote environments in sync.
Commands
Section titled “Commands”lps composer push
Section titled “lps composer push”Upload composer.json and composer.lock to WordPress and run composer install on the server.
lps composer push| Flag | Description |
|---|---|
--dry-run / -d |
Show what would be sent without making any changes |
If a composer.lock is present, the server runs a reproducible install. If no lock file is found, the server resolves versions freely and a warning is shown.
The command waits for the server-side composer install to finish, up to 10 minutes. A cold install with many packages can take a while: this is expected. If the call does time out, the install may still be running on the server, so check the site before retrying.
Example output:
Pushing composer.json (3 packages) to https://example.com + composer.lock included (reproducible install)Running composer install on the server, this can take a few minutes...composer install completed on the server.lps composer pull
Section titled “lps composer pull”Download the current composer.lock from the WordPress server to your local directory.
lps composer pull| Flag | Description |
|---|---|
--dry-run / -d |
Show what would be written without touching the filesystem |
The file is written to the path resolved from rootDir in loopress.json (defaults to the current directory).
Typical workflow
Section titled “Typical workflow”# 1. Add a dependency locallycomposer require tecnickcom/tcpdf
# 2. Push the updated composer.json and lock to the serverlps composer push
# 3. Pull the lock back if the server resolved it differentlylps composer pullRelation to the WordPress plugin
Section titled “Relation to the WordPress plugin”The lps composer push command uses the same REST endpoint (/wp-json/loopress/v1/composer/sync) as Loopress Full’s Admin UI panel. Both tools write to wp-content/loopress/. You can use either depending on your workflow: the admin panel for interactive installs, the CLI for scripted or CI deployments.