Configuration
Settings live under Settings → Plugins → Live, or Live → Settings for admins. Every one of
them can also be set in config/live.php, which wins over the control panel.
The defaults are the ones to run a public live blog on. Most sites change nothing.
Snapshots
| Setting | Default | What it does |
|---|---|---|
snapshotsEnabled | true | Each publish writes static JSON into the web root, so readers poll a file instead of waking Craft. Turn it off only if the web root isn't writable. |
snapshotPath | @webroot/live-feed | Where the files are written. Must be inside the web root. Accepts aliases and environment variables. |
snapshotUrl | @web/live-feed | The URL those files are served from. Accepts aliases and environment variables. |
headWindow | 20 | How many recent updates head.json lists inline. Larger means a reader can catch up further without a reload. |
prerenderHtml | true | Render each update's HTML at publish time through your own template, so appended updates match the page exactly. |
updateTemplate | '' | Site template used to render one update. Empty means live/_update. |
With snapshots on, both snapshotPath and snapshotUrl are required: snapshotting to nowhere is a
silent no-op, so the settings screen refuses it.
Reading
| Setting | Default | What it does |
|---|---|---|
pollInterval | 5 | Seconds between reader checks (1–300). Also how long a CDN may hold head.json. |
composerPollInterval | 8 | Seconds between control-panel refreshes, so editors see each other's updates (2–300). |
invalidateOwnerCaches | false | Whether a publish also clears the entry's template caches. Off, because the point is that the page stays cached while updates arrive around it. |
timestampFormat | H:i | PHP date format for timestamps in the shipped templates. |
bodyAllowedHtml | '' | HTMLPurifier HTML.Allowed string for update bodies. Empty means Live's own list: what the composer can produce, plus links and images. |
Editing (Pro)
| Setting | Default | What it does |
|---|---|---|
presenceEnabled | true | Show who else is in the composer. |
presenceTtl | 60 | Seconds without a heartbeat before an editor is treated as gone (15–3600). |
Server-sent events (Pro)
| Setting | Default | What it does |
|---|---|---|
sseEnabled | false | Push updates over an open connection instead of waiting for the next poll. Read the note on SSE before turning it on. |
sseMaxClients | 50 | Streams beyond this are turned away and fall back to polling. |
sseMaxDuration | 30 | Seconds before a stream asks the client to reconnect. |
ssePollInterval | 500 | Milliseconds between checks inside an open stream. |
CDN purging (Pro)
| Setting | Default | What it does |
|---|---|---|
purgeDriver | none | none, cloudflare, fastly or webhook. |
purgeZoneId | null | Cloudflare zone ID. |
purgeToken | null | Cloudflare or Fastly API token. Accepts an environment variable — store it in one. |
purgeUrl | null | Webhook URL. Live POSTs {"urls": [...]} to it. |
purgeThrottle | 60 | Seconds between purges of the same post, however many updates land in between (5–3600). |
What gets purged, and why so rarely, is in Delivery.
Field settings
Each Live field has its own options, under the field's settings:
| Option | Default | What it does |
|---|---|---|
| Update types | all | Which kinds of update this feed accepts. Leave all unchecked to allow every type. |
| Order | Newest first | Newest first reads like a news feed; oldest first reads like a commentary. |
| Updates per page | 50 | How many updates the composer loads at a time (5–500). |
| Show other editors | on | Show who else has this post open (Pro). |
| Allow scheduled updates | off | Offer a "post at" time in the composer (Pro). |
config/live.php
Anything in this file overrides what is saved in the control panel. The settings screen does not mark overridden fields, so if a change there seems to do nothing, check this file first. It takes the usual multi-environment shape:
<?php
use craft\helpers\App;
return [
'*' => [
'pollInterval' => 5,
'headWindow' => 20,
],
'production' => [
'snapshotUrl' => 'https://cdn.example.com/live-feed',
'purgeDriver' => 'cloudflare',
'purgeZoneId' => App::env('CLOUDFLARE_ZONE_ID'),
'purgeToken' => '$CLOUDFLARE_API_TOKEN',
],
'dev' => [
'purgeDriver' => 'none',
],
];
Environment variables
snapshotPath, snapshotUrl and purgeToken are resolved through Craft's environment variable
parsing, so $LIVE_SNAPSHOT_URL or @web/live-feed both work, whether typed in the control panel
or set in config/live.php.
For the Cloudflare zone ID and the webhook URL, read the variable in config/live.php with
App::env(), as above, so the resolved value is what Live sees.