Configuration
Archive works out of the box; every setting below has a sensible default. Change them in Archive → Settings, or in a config file for environments where admin changes are off.
Storage
| Setting | Default | What it does |
|---|---|---|
bundlePath |
@storage/archive/bundles |
Where finished bundles are kept. Craft aliases and environment variables are both resolved, so $ARCHIVE_PATH works. Keep it out of the webroot. |
tempPath |
@storage/archive/tmp |
Where bundles are staged while being built. Cleared after each run. Needs room for one bundle’s worth of files. |
Defaults for new exports
| Setting | Default | What it does |
|---|---|---|
defaultFormat | json | Which format the export form and console command start on. |
includeSchema | true | Whether the site’s structure is written into the bundle. |
includeAssetFiles | true | Whether files from local volumes are copied in. |
downloadRemoteAssets | false | Whether files on S3, Spaces and other remote filesystems are downloaded. See Assets. |
maxAssetFileSize | 256 | Megabytes. Files above this are referenced rather than copied, and noted in the warnings. 0 disables the limit. |
Each of these is also a control on the export form, so a single run can depart from the default without changing it.
Privacy
| Setting | Default | What it does |
|---|---|---|
allowUserExport |
false |
Whether user accounts may be exported at all. While off, users aren’t offered on the export screen and addresses owned by a user account are held back. Password hashes are never exported regardless. See Users & privacy. |
Retention
| Setting | Default | What it does |
|---|---|---|
retentionDays | 30 | Days to keep finished bundles. 0 keeps them indefinitely. |
retentionCount | 20 | Maximum bundles to keep regardless of age. 0 keeps them all. |
Both apply together — a bundle is pruned when it fails either test. Run php craft archive/bundles/prune to apply them on demand; schedule it if exports are automated.
Performance and logging
| Setting | Default | What it does |
|---|---|---|
batchSize | 100 | How many elements are loaded at a time while collecting. Lower it on a memory-tight host; raise it on a fast one. |
logLevel | info | One of error, warning, info, debug. Archive logs to its own storage/logs/archive.log, not into Craft’s general log. |
Config file
On environments with allowAdminChanges off, or when settings should be in version control, create config/archive.php. It follows Craft’s usual multi-environment shape:
<?php
return [
'*' => [
'defaultFormat' => 'json',
'includeSchema' => true,
'maxAssetFileSize' => 256,
'retentionDays' => 30,
'retentionCount' => 20,
'allowUserExport' => false,
],
'production' => [
// Somewhere with room, off the app server's small disk
'bundlePath' => '$ARCHIVE_BUNDLE_PATH',
'batchSize' => 250,
'logLevel' => 'warning',
],
];
Values set in a config file override the ones in the database and appear read-only in the control panel, as with any Craft plugin.