Why Inertia?
When teams want interactive React, Vue, or Svelte interfaces in ProcessWire, they usually hit a fork in the road: either sprinkle isolated scripts onto server-rendered PHP templates, or build a decoupled frontend that duplicates routing, authentication, validation, and data fetching over a REST API.
Inertia bridges both worlds. ProcessWire remains the single source of truth for URLs, permissions, selectors, and forms, while your JavaScript framework handles the view layer.
Comparing ProcessWire Frontend Architectures
Section titled “Comparing ProcessWire Frontend Architectures”| Aspect | Classic Templates | Inertia Hybrid Mode | Inertia Full SPA Mode |
|---|---|---|---|
| Routing & Access Control | ProcessWire Page Tree | ProcessWire Page Tree | ProcessWire Page Tree |
| View Layer | PHP templates / Markup Regions | Classic PHP + Inertia on selected templates | React, Vue, or Svelte across all frontend templates |
| API Boilerplate | None | None (props passed directly from PHP) | None (props passed directly from PHP) |
| Authentication & CSRF | Native $user & $session->CSRF |
Native $user & $session->CSRF |
Native $user & $session->CSRF |
| Client-Side Page Transitions | Full browser reload | SPA transitions between Inertia templates | SPA transitions across the entire site |
| SEO & Initial HTML | Server-rendered HTML | Server-rendered HTML or SSR | Server-rendered HTML or SSR |
| TypeScript Safety | Manual | Auto-generated inertia.d.ts |
Auto-generated inertia.d.ts |
Why Choose Hybrid Mode First?
Section titled “Why Choose Hybrid Mode First?”Hybrid Mode (mode = 'selected') is the default because it lets you modernize an existing ProcessWire site without rewriting working pages:
- Zero disruption to Markup Regions: Inertia sets
$template->noAppendTemplateFile = trueonly on templates enabled for Inertia. It never mutates$config->useMarkupRegionsglobally, so classic templates keep using_main.phpuntouched. - Incremental adoption: Start with an interactive search directory, booking flow, or account dashboard while leaving marketing pages in classic PHP.
- Shared foundation for admin modules: First-party modules such as
Reactbuild directly on top ofInertiausingProcessInertia,MarkupInertia, andInputfieldInertia.
When to Choose Full SPA Mode
Section titled “When to Choose Full SPA Mode”Switch to Full SPA Mode (mode = 'all') when every frontend template on the site is rendered by your JavaScript framework and you want instant client-side navigation across every link.