Configure Inertia under Modules > Configure > Inertia in the ProcessWire Admin, or adjust routing and version behavior programmatically at runtime in site/init.php or site/ready.php.
Setting Key
Type
Default
Description
mode
string
'selected'
Template activation mode: 'selected' (Hybrid Mode alongside classic templates) or 'all' (Full SPA Mode across all frontend templates).
enabledTemplates
list<string>
[]
ProcessWire template names handled by Inertia when mode is 'selected'. System templates and admin are excluded.
disableAppendTemplateFile
bool
true
Sets $template->noAppendTemplateFile = true on Inertia templates so _main.php is skipped before rendering _inertia.php.
disablePrependTemplateFile
bool
false
When enabled, skips $config->prependTemplateFile (_init.php) on Inertia templates. Leave unchecked if you register shared props in _init.php.
Setting Key
Type
Default
Description
rootView
string
'_inertia.php'
Root View filename inside site/templates/ used on initial full-page loads.
rootElementId
string
'app'
DOM mount element ID emitted by $inertia->app($pageObject) (<div id="app">).
syncJsonToPost
bool
true
Populates $input->post automatically from application/json request bodies sent by Inertia forms.
autoShareFlash
bool
true
Shares ProcessWire $notices (messages, warnings, errors) under props.flash on every response.
autoShareCsrf
bool
true
Exposes the ProcessWire CSRF token in props.csrf and emits the XSRF-TOKEN cookie for automatic X-XSRF-TOKEN header injection.
encryptHistory
bool
false
Enables Inertia v3 browser history encryption across all responses unless overridden per page.
Setting Key
Type
Default
Description
ssrEnabled
bool
false
Dispatches initial Page Objects to a local Node or Bun SSR server via HttpGateway, falling back cleanly to client-side rendering if unreachable.
ssrUrl
string
'http://127.0.0.1:13714/render'
SSR gateway endpoint URL. Must satisfy loopback or allowlist security checks.
ssrTimeout
float
1.5
HTTP timeout in seconds when waiting for an SSR render response before falling back to CSR.
Setting Key
Type
Default
Description
tracySupport
bool
true
Registers the Inertia v3 protocol panel in TracyDebugger whenever $config->debug is true.
autoGenerateTypes
bool
true
Automatically regenerates inertia.d.ts when saving module settings or (in debug mode) when saving templates or fields.
autoScaffoldPageClasses
bool
true
Creates missing site/classes/[PascalCase]Page.php classes with @property PHPDoc annotations. Existing files are never overwritten.
typeScriptOutputPath
string
'assets/js/types/inertia.d.ts'
Output path for inertia.d.ts, relative to site/templates/ or as an absolute path inside site/.
You can configure routing, Root View selection, and asset versioning dynamically in site/init.php or site/ready.php:
// Hybrid Mode: enable specific templates at runtime
$inertia -> forTemplates ([ 'home' , 'article' , 'directory' ]);
// Or switch to Full SPA Mode across all frontend templates
// $inertia->forAllTemplates();
// Override the Root View template for a specific request
$inertia -> setRootView ( '_inertia.php' );
// Override the automatic Vite manifest hash with a custom release version
$inertia -> version ( static fn () : string => '2026.05.01' );