Blog

  • Building assets at deploy time

    Building assets at deploy time

    With --node-build="npm run build" Cipi runs the command in each new release before current moves. Here the build only writes assets/build-info.json in the theme — enough to see on the Deploy status page that it ran, and when.

    A build that fails stops the deploy: the site stays on the release it had.

  • Plugins come from Git

    Plugins come from Git

    A plugin installed from wp-admin would be written into the current release, and the next deploy would replace that release without it. So Cipi turns file changes off in the .env, and plugins, themes and WordPress itself come from the repository.

    This repository commits one: Cipi Cache, in wp-content/plugins/cipi-cache. Turn the page cache on with sudo cipi cache <app> on, activate the plugin, and an edit purges the pages it touches.

  • Cron without visitors

    Cron without visitors

    Cipi sets DISABLE_WP_CRON and adds wp-cron.php of the live release to the app’s crontab, every minute.

    This demo schedules an event every minute that writes the time it ran: the Deploy status page shows how long ago. Leave the site alone for a few minutes and check again.

  • Rolling back

    Rolling back

    Deployer keeps the last releases on disk. When one goes live and turns out to be wrong, sudo cipi deploy <app> --rollback moves current back to the previous release.

    Try it: deploy twice, note the release number in the badge, roll back, reload. The uploads and the database are untouched — they were never in the release.

  • What lives in shared/

    What lives in shared/

    A release is replaced whole at the next deploy. What must outlive it lives once, in shared/, and is linked into each release:

    wp-content/uploads — the images of these posts were uploaded once, by the first release that ran. If they still show after a few deploys, the link works.

    .env — the database, the salts, WP_HOME and WP_SITEURL. Change them with sudo cipi app env <app>.

    wp-config.php — written by Cipi, reads the .env. A wp-config.php committed in the repository is replaced by it at every deploy.

  • Hello from a release

    Hello from a release

    This WordPress was not uploaded over SFTP: it is a Git repository. Every deploy checks the commit out into releases/<n>, links what has to survive from shared/, and only then moves current to it.

    Look at the bottom-right corner of the page: the badge says which release rendered it, and which commit. Push a change, deploy, reload — the number goes up and the page never answers with half of each.

    The Deploy status page checks the rest: Cipi’s wp-config.php, the uploads, the database, the cron.

Cipi demo · release 1 · 8e4f422 · PHP 8.5.13 · rendered 16:20:10 UTC