Skip to main content

Installation

Download wpc.phar using wget or curl. For example:
To be able to type just wpc, instead of php wpc.phar, you need to make the file executable and move it to somewhere in your PATH. For example:
The CLI needs PHP 8.2 or later with the zip extension.

Keep wpc up to date

wpc self-update replaces the installed phar with the latest stable release. The download is verified against its published SHA-256 checksum, and the previous version is kept for rollback.
self-update never moves backwards, and never crosses a major version on its own: a major release may rename the commands or options a script relies on, so it refuses until you run it with --major. Pre-releases are not published to the update channel; download them from their versioned URL (https://downloads.wp-content.io/wpc-cli/<version>/wpc.phar). When you run wpc in a terminal, it prints a one-line notice on stderr if a newer version exists. The notice is skipped for automation (--output=json, -q, -n, piped output, CI). Set WPC_NO_UPDATE_CHECK=1 to disable it.

Use the Docker image

The CLI is also published as a Docker image, with PHP, the zip extension, composer, git and unzip. See Integrate in your CI/CD for the available tags.