Skip to content

Acorn Docs

Installation

What is Acorn?

Acorn is a way to use Laravel components inside of WordPress.

Why use Acorn?

Acorn brings elements of the Laravel ecosystem to any WordPress plugin or theme.

To put it simply, Acorn provides a way to gracefully load a Laravel application container inside of WordPress while respecting the WordPress lifecycle and template hierarchy.

This means you get access to Laravel's artisan commands through the use of wp acorn. You can utilize Blade templates. You gain access to third-party packages built specifically for Acorn. And we provide some first-party components as well, such as view composers and assets management.

Installing Acorn with Composer

We recommend that you install Acorn on your WordPress install managed by Composer, such as with Bedrock:

We also recommend adding Acorn's postAutoloadDump function to Composer's post-autoload-dump event in composer.json:

If you don't use Bedrock and you are using a Sage-based theme, you can install Acorn with Composer from your theme directory.

Server requirements

Acorn's server requirements are minimal, and mostly come from WordPress and Laravel 8's requirements.

  • PHP >=8.0
  • WordPress >= 5.4
  • BCMath PHP Extension
  • Ctype PHP Extension
  • Fileinfo PHP Extension
  • JSON PHP Extension
  • Mbstring PHP Extension
  • Tokenizer PHP Extension
  • XML PHP Extension

Contributors

Last updated

Digging Deeper