PHPackages                             justdev/inertia-wordpress - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. justdev/inertia-wordpress

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

justdev/inertia-wordpress
=========================

The WordPress adapter for Inertia.js

0.5.9(9mo ago)250MITPHP

Since Jul 27Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/kirilldorozhynskyi/inertia-wordpress)[ Packagist](https://packagist.org/packages/justdev/inertia-wordpress)[ RSS](/packages/justdev-inertia-wordpress/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (6)Used By (0)

Inertia.js WordPress Adapter
============================

[](#inertiajs-wordpress-adapter)

The unofficial [Inertia.js](https://inertiajs.com) server-side adapter for WordPress.

Installation
------------

[](#installation)

Option 1: Install the package via composer. (**Recommended**)

```
composer require boxybird/inertia-wordpress

```

Option 2: Clone or download as a plugin and run `composer install` before activating in WordPress Admin.

Bare-bones Example Theme
------------------------

[](#bare-bones-example-theme)

-

Example Movie CPT WordPress Project
-----------------------------------

[](#example-movie-cpt-wordpress-project)

- Demo:
- Theme:

Inertia Docs
------------

[](#inertia-docs)

- Links:
- Pages:
- Requests:
- Shared Data:
- Asset Versioning:
- Partial Reloads:

Root Template Example
---------------------

[](#root-template-example)

> Location: /wp-content/themes/your-theme/app.php

```
DOCTYPE html>

         // Adds Inertia to the page

```

### Root Template File Override

[](#root-template-file-override)

> Location: /wp-content/themes/your-theme/functions.php

By default the WordPress adapter will use the `app.php` from `.../your-theme/app.php`. If you would like to use a different file name, you can change it. E.g. `.../your-theme/layout.php`.

```
