Laravel components for WordPress plugins and themes

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

  # Add Acorn to your WordPress project
  $ composer require roots/acorn

  # Acorn CLI
  $ wp acorn
Read the docs

Laravel Blade views, Components, and more

Acorn WP-CLI Integration

  # Acorn CLI
  $ wp acorn

    Acorn 2.0.0 (Laravel 8.81.0)

    USAGE: wp acorn <command> [options] [arguments]

    clear-compiled   Remove the compiled class file
    completion       Dump the shell completion script
    env              Display the current framework environment
    help             Display help for a command
    list             List commands
    optimize         Cache the framework bootstrap files

    acorn:init       Initializes required paths in the base directory.

    config:cache     Create a cache file for faster configuration loading
    config:clear     Remove the configuration cache file

    make:command     Create a new Artisan command
    make:component   Create a new view component class
    make:composer    Create a new view composer class
    make:provider    Create a new service provider class

    optimize:clear   Remove the cached bootstrap files

    package:discover Rebuild the cached package manifest

    vendor:publish   Publish any publishable assets from vendor packages

    view:cache       Compile all of the application's Blade templates
    view:clear       Clear all compiled view files

Help support our open-source development efforts

Help us grow

Join over 7,800+ subscribers on our newsletter to get the latest Roots updates, along with occasional tips on building better WordPress sites.

Looking for WordPress plugin recommendations, the newest modern WordPress projects, and general web development tips and articles?

“Easily the best WordPress email I get.” Colin OBrien

Follow us on Twitter @rootswp

Ready to checkout?