Skip to content

Installation

Before installing Inertia, verify that your environment meets these requirements:

Requirement Version
PHP >= 8.4
ProcessWire >= 3.0.271
Required Module Vite (trk/processwire-vite)
Node.js or Bun Node >= 20 or Bun >= 1.1 for Vite builds and optional SSR
Optional CLI trk/processwire-console (vendor/bin/wire) for inertia:* commands

Ensure Vite is installed first so ProcessWire can resolve the dependency cleanly, then install Inertia:

  1. Require the package from your project root:

    Terminal window
    composer require trk/processwire-inertia
  2. Refresh and install Inertia:

    Terminal window
    php vendor/bin/wire module:refresh
    php vendor/bin/wire module:install Inertia

Run inertia:install and pick your preferred frontend stack (vue, react, or svelte), then start Vite (npm run dev):

Terminal window
php vendor/bin/wire inertia:install --stack=react --template=inertia

Pass --dry-run first if you want to preview every file and configuration change without writing to disk. Install the Inertia v3 client adapter for your chosen framework (@inertiajs/react, @inertiajs/vue3, or @inertiajs/svelte) and start your Vite dev server with npm run dev.

Running inertia:install publishes the starter files inside site/ without overwriting existing files unless you pass --force:

  • Directorysite/
    • Directoryclasses/
      • DefaultPage.php
      • InertiaPage.php
    • Directorytemplates/
      • _inertia.php
      • inertia.php
      • Directoryassets/
        • Directoryjs/
          • inertia.ts
          • DirectoryPages/
            • Home.tsx
          • Directorytypes/
            • inertia.d.ts

Next steps