# Livewire update route can't be found on new project setup

**URL:** https://discourse.roots.io/t/livewire-update-route-cant-be-found-on-new-project-setup/29378
**Category:** sage
**Tags:** sage11, acorn, livewire
**Created:** 2025-03-06T09:56:25Z
**Posts:** 2

## Post 1 by @stephan765 — 2025-03-06T09:56:25Z

I’ve just been setting up a new project with Trellis + Sage, just following the documentation so far without adding anything custom, but as soon as I add the simple livewire example [in the documentation](https://roots.io/acorn/docs/using-livewire-with-wordpress/)—specifically, as soon as I add the `@livewireScripts` directive, my app crashes with the error “Route [livewire.update] not defined.”

To reproduce:

- `trellis-cli 1.13.0` to set up the project
- `enabled: true` under `SSL` key in `development/wordpress_sites.yml`
- in the `themes` directory, `composer create-project roots/sage my-theme-name` (I ran this command yesterday, and `theme.json` confirms Sage 11.0.0
- in the new theme directory, `composer require livewire/livewire`, which I can see is `v3.6.1`
- finally, I’ve just followed [the remaining steps on this page](https://roots.io/acorn/docs/using-livewire-with-wordpress/) exactly, so won’t reprint it all here, but in short that is rendering the `@livewireScripts` directive in the WP hooks, using `wp acorn` to create a new Livewire component, and then using it with `<livewire:post-list />` on a page (in my case `index.blade.php`)

After building, I visit the site homepage locally and get `Symfony\Component\Routing\Exception\RouteNotFoundException` with message `Route [livewire.update] not defined.`

Running `wp acorn route:list` confirms that Acorn does have five routes registered:

```
GET|HEAD livewire/livewire.js
GET|HEAD livewire/livewire.min.js.map
GET|HEAD livewire/preview-file/{filename}
POST livewire/update
POST livewire/upload-file
```

I’ve added nothing beyond this, and am quite stuck figuring out why the route wouldn’t be defined. Any help or pointers much appreciated.

---

## Post 2 by @Log1x — 2025-03-06T09:59:26Z

add `->withRouting(wordpress: true)` to `Application::configure()` in `functions.php`. will get the docs updated.
