Configuration

Holmes works with no configuration. Every setting below has a default chosen to be safe on a large production site.

Settings live at Holmes → Settings (admins only), and can be overridden in config/holmes.php like any Craft plugin.

Audits

SettingDefaultWhat it does
defaultMode quick Which mode the new-audit form and the console command start from. quick or deep.
deepLimit 500 How many elements a deep audit will load per element type before it stops, newest first. This is the knob that keeps an audit of a 200,000-entry site finite. 0 means no cap.
batchSize 100 How many elements are loaded at a time during a deep audit or a reindex. Lower it if memory is tight.
maxIssuesPerCheck 500 Maximum findings recorded per check, per audit. Findings beyond this are counted but not stored — 400,000 identical rows help nobody, and the count is what you act on.
queueDeepAudits true Whether deep audits are pushed to the queue rather than run in the request. On by default: a deep audit loads elements, and web requests time out.
retentionCount 20 How many finished audits to keep. Older ones, and their findings, are pruned after each run. 0 keeps them all.
disabledChecks [] Check handles that never run. Handy when a site legitimately trips one — a headless install with no titles, say.
ignoredElementTypes [] Element type classes excluded from every audit. Worth using for high-volume types that are not user-searchable.

Search console

SettingDefaultWhat it does
probeLimit 50 How many rows the search console returns per query.
keywordPreviewLength 300 How many characters of a row’s keywords the control panel shows before truncating the display. The full value is always available on the element’s detail screen.

Repairs

SettingDefaultWhat it does
queueReindexing true Whether reindexing from the control panel is queued rather than run in the request.

Logging

SettingDefaultWhat it does
traceIndexWrites false Whether every write Craft makes to the search index is recorded in storage/logs/holmes.log. Off by default — it is noisy on a busy site — but it is the fastest way to answer “what is rewriting this row?”
logLevel info One of error, warning, info, debug.

In a config file

Anything above can be set in config/holmes.php, with the usual Craft multi-environment shape. Settings set here are locked in the control panel.

<?php

return [
    // Deep by default, but bounded.
    'defaultMode' => 'deep',
    'deepLimit' => 2000,

    // Orders are not user-searchable on this site.
    'ignoredElementTypes' => [
        'craft\commerce\elements\Order',
    ],

    // This site's archive entries are deliberately blank.
    'disabledChecks' => ['empty-keywords'],

    'production' => [
        'queueDeepAudits' => true,
        'queueReindexing' => true,
        'retentionCount' => 60,
    ],

    'dev' => [
        'queueDeepAudits' => false,
        'traceIndexWrites' => true,
    ],
];

A note on required settings

None of these are validated as required, deliberately. A required rule fails validation on the whole settings model, which on a fresh install can block saving any setting at all — including the ones you need to set to get out of the situation.