Skip to content

Acorn Docs

Upgrading Acorn

Upgrading to v3.x from v2.x

Acorn v3 includes Laravel v9 components, whereas Acorn v2 includes Laravel v8 components.

Estimated upgrade time: 15 minutes

Upgrading dependencies

Acorn v3 requires PHP >= 8.0.2.

Update the roots/acorn dependency in your composer.json file to ^3.0:

The -W flag is required to upgrade the included Laravel dependencies.

Theme/application

Acorn v2 is typically booted in your WordPress theme's functions.php file. Look for the line that includes \Roots\bootloader(), and replace it with \Roots\bootloader()->boot().

You can also remove the theme support added for Sage if you are working on a Sage-based WordPress theme:

Target class [sage.view] does not exist

Some setups may require changes if you run into the following error:

In this case, edit the ThemeServiceProvider and make sure it extends SageServiceProvider and has parent:: calls to register() and boot() if they are present:

Reference the Acorn v3 upgrade pull request on the Sage repo to see a full diff.

Target class [assets.manifest] does not exist

Some setups may require changes if you run into the following error:

This error can be fixed by copying over the latest changes to the config/app.php file from Acorn.

Contributors

Last updated

Support Roots

Help us continue to build and maintain our open source projects. We’re a small team of independent developers and every little bit helps.

Sponsor Roots on GitHub

Digging Deeper