Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Acorn Laravel Package

roots/acorn

Acorn brings Laravel to WordPress: Blade templates, routing, caching, events, validation, and Laravel packages in your WordPress projects, with Laravel's patterns for cleaner, better code.

View on GitHub
Deep Wiki
Context7

Framework for Roots WordPress projects built with Laravel components.

Frequently asked questions about Acorn
What is Acorn and how does it work with WordPress?
Acorn is a bootstrapping layer from Roots that stands up a Laravel container and service-provider lifecycle inside a WordPress request, then hands control back to WordPress. You get most Laravel components, including Blade views, routing, caching, events, validation, queue, and a console, for use in your theme and plugin code. It is not a standalone library or a WordPress replacement; think of it as the Laravel application model running as the substrate for your WordPress code.
How do I install Acorn in a Sage or Bedrock WordPress project?
Run composer require roots/acorn, then use acorn:install to scaffold the directory layout and configuration, and register your service providers in the theme or plugin. It assumes a Composer-based WordPress setup such as Bedrock and pairs naturally with Sage's Blade theme structure. Console commands are available through wp acorn via WP-CLI once installed.
Which PHP and Laravel versions does Acorn require?
Acorn v6 requires PHP 8.3 or newer and tracks Laravel 13, while Acorn v5 requires PHP 8.2 and targets Laravel 12. Majors follow Laravel majors, so expect a forced upgrade roughly once per Laravel release cycle. The PHP floor is a hard gate against your hosting fleet, so verify it before committing.
Can I use Acorn in a plugin or a classic WordPress theme?
Acorn is a first-class framework dependency with an opinionated directory layout, so it fits best in new Bedrock and Sage projects. Retrofitting it into a classic theme or an existing plugin is a re-platforming exercise rather than a drop-in integration. It is a poor fit for distributed plugins that must run on arbitrary hosts with unknown PHP versions.
What Laravel features does Acorn not support?
Acorn ships 27 illuminate/* components but explicitly does not support mail, notifications, broadcasting, Redis, or translation. Keep WordPress-native wp_mail, WordPress i18n functions such as __() and load_theme_textdomain(), and non-Redis queue backends. Any roadmap item that relies on Laravel's mailer, notifications, or Redis queues needs to be rewritten.
Does Acorn work with WordPress multisite?
Per-site cache, session, and queue isolation landed in Acorn v5.1.0, so treat earlier versions as unusable on multisite. On 5.1 and later, verify that isolation behaves as expected in your environment rather than assuming it. Multisite support should be an explicit item in your upgrade and regression testing.
How do I run Artisan-style commands in WordPress with Acorn?
Console commands run through WP-CLI using wp acorn, which gives you Artisan-style commands plus any custom commands you register. WP-CLI must be installed for this to work. This path has broken before, for example the Composer-installed WP-CLI fix in v5.0.4, so pin WP-CLI and retest the command path on upgrades.
What should I test before upgrading Acorn in production?
Acorn sits on WordPress's global-state request lifecycle, so upgrades can shift superglobal restoration, wp_magic_quotes handling, output buffering, status codes, response headers, and flash sessions. The changelog is essentially a list of fixes at that seam. Budget for regression testing on every Acorn upgrade rather than relying on smoke tests.
How does Acorn handle Laravel security patches and CVEs?
Laravel component CVEs are fixed upstream, and Acorn must ship a release that pins the patched illuminate/* packages. Between upstream disclosure and an Acorn release, your project is exposed and cannot easily self-patch without forking or overriding Composer constraints. Define a compensating control, such as rapid constraint overrides or active advisory monitoring.
Are there alternatives to Acorn, and when should I use one?
Within the Roots ecosystem Acorn is the only mature option for the Laravel-on-WordPress application model; alternatives generally mean avoiding a second framework runtime or using lighter integrations. If you do not want a container, service providers, and Blade as your substrate, staying WordPress-native is the reasonable choice. Also check for plugins that bundle their own Illuminate or Symfony copies, since they can collide with Acorn's classes.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
adachsoft/command-executor-lib
tagixo/document-builder
tagixo/page-builder
tagixo/mail-builder
tagixo/form-builder
primix/primix
tagixo/core
alesima/laravel-azure-service-bus
tomshaw/shopcart
likyly/laravel
darthsoup/shoppingcart
tdt/core
labyrinthe/connect-php
encore2/laravel-admin2
cboxdk/laravel-console-kit
shapecode/doctrine-dbal-datetimeutc
gilads-otiannoh254/inertia-protocol
dakiquang/laravel-oauth-refresh-lock
woda/laravel-worktrees
dalefranks/ramasite