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: use Blade templates, routing, caching, events, validation, and Laravel packages in your WordPress projects, with Laravel's patterns and utilities for cleaner code.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. Acorn is an integration layer, not a framework replacement: it boots an Illuminate service container from an mu-plugin and grafts Laravel's contracts onto WordPress's plugin/theme lifecycle. Fit is high only where the surrounding stack is already Roots-shaped (Sage theme, Bedrock layout, Composer-driven deploys). On a vanilla or page-builder-led WordPress estate, adopting Acorn is an architectural commitment — the theme becomes a small Laravel application with service providers, a wp acorn CLI surface, and Blade as the view layer.

Component coverage is the decisive architectural question. 27 illuminate/* packages are supported (container, routing, cache, queue, validation, events, session, Blade, database/Eloquent, HTTP client); broadcasting, mail, notifications, redis, and translation are explicitly not. That means a "lift and shift" of an existing Laravel app is not viable — mail/notification-heavy or i18n-heavy domains must stay on native WordPress (wp_mail, __()/POT files) or add third-party glue. Treat this as a scoping filter, not a defect.

Integration feasibility. Mechanically straightforward: Composer install, mu-plugin autoloader, wp acorn for artisan-style commands, Vite manifest integration for assets, Bundle helpers for enqueueing. Prerequisites are non-trivial but standard for modern WP: Composer 2, PHP 8.3+ at v6, and a Node build step for theme assets. Route caching (route:cache) and storage:link are available, which signals production intent rather than a dev-only toy.

Technical risk. Three risks dominate:

  1. Request-lifecycle interception. This is the historically fragile seam. v4.0.2 pulled the WordPress response wrapper back behind ACORN_ENABLE_EXPERIMENTAL_WORDPRESS_REQUEST_HANDLER after a week of production pain; v5.1.1 had to restore superglobals after Request::capture(); v4.0.1 added early bail-outs for wp-login.php, wp-admin, and /wp- paths. Custom routes short-circuit parse_request, which is exactly where auth, canonical redirects, REST, and admin behaviour live. Any regression here is site-wide severity.
  2. Upstream version coupling. Acorn majors track Laravel majors (v6 = Laravel 13, PHP 8.3+ floor). Your upgrade calendar is partly dictated by Laravel's release train, and each hop can force a PHP floor bump across the hosting fleet.
  3. Global state and singletons. Fixes like the v6.1.0 Vite singleton sharing bug are subtle, hard to catch in review, and only surface at runtime with CSP nonces or integrity keys.

Secondary signal: 1,010 stars with dependents: 0 in this dataset is a data-quality artifact, not evidence of adoption — validate real pull-through via Packagist download trends before treating popularity as a proxy for ecosystem safety. A composite score of ~39 (opportunity ~42) reads as "credible, niche, not a default choice."

Key questions for the assessment gate.

  • Do we need Laravel patterns (Blade, container, routing, validation) or Laravel parity (mail, notifications, queues, i18n)? Only the former is in scope.
  • What is the PHP floor across our hosting fleet and can we enforce 8.3+ at deploy time?
  • Who owns the mu-plugin + Composer + Vite layer in production — is that a platform team or the theme developer?
  • Which installed plugins hook parse_request, template_redirect, or mutate superglobals early? Those are our conflict surface.
  • What is the kill switch if a boot failure takes the site down?
  • Does any roadmap item depend on illuminate/mail, notifications, redis, or translation?

Integration Approach

Stack fit. Strong: Sage + Bedrock + Trellis + Acorn is a coherent, documented path, and the Roots ecosystem (Radicle, WP Packages) supplies adjacent tooling. Medium: vanilla WordPress with Composer and a custom theme — workable, but you own the wiring and lose the opinionated scaffolding. Low: legacy sites without Composer, or sites whose templates are owned by a page builder — do not force Acorn here.

Migration path. Three viable shapes, in increasing cost:

  • Greenfield theme — start on Sage + Acorn, Blade from day one. Lowest risk, highest payoff.
  • Incremental in an existing theme — add Acorn as an mu-plugin, require the autoloader, and migrate partials to Blade one at a time. v4.1.0's preservation of template hierarchy paths makes this materially safer than it once was; keep WordPress template files as the fallback until each is proven.
  • Perimeter adoption — use Acorn only for new surface area (custom routes, blocks, validation, a queue-backed job) and leave existing PHP templates untouched. Good for proving value without a rewrite.

Avoid the anti-pattern of porting Laravel controllers wholesale: unsupported components will fail at runtime, and WP's request model is not Laravel's.

Compatibility. Pin and test explicitly: WordPress core version (no bounded range is evident in the release notes — assume you must verify), PHP 8.3+, Composer 2, Node LTS for Vite. Known friction categories: plugins that assume raw superglobals, security/redirect plugins that fight Acorn's parse_request short-circuit, and any plugin expecting to own /wp- paths. Community packages (ACF, WooCommerce, Livewire) each carry independent maintenance risk — vet them as separate dependencies, not as "part of Acorn."

Sequencing.

  1. Prove the platform: PHP 8.3+, Composer, CI, and a reproducible Vite build.
  2. Install Acorn on a low-traffic staging site; explicitly regression-test login, admin, REST, canonical redirects, 404s, and search.
  3. Adopt Blade + view composers for templates; leave routing alone initially.
  4. Introduce routing, validation, and Eloquent-style models for new features only.
  5. Add route:cache / config caching to the deploy pipeline and measure boot cost.
  6. Evaluate community packages and Livewire last, each behind a spike.
  7. Establish a version-pinning policy and a documented upgrade runbook tied to Laravel majors.

Operational Impact

Maintenance. You inherit two supply chains — WordPress and Laravel — with Acorn pinned between them. Composer lockfile discipline and a committed composer.lock are non-negotiable. Upstream has Renovate configured (v6.2.0) and a formal upgrade guide, which reduces drift, but the annual-ish major cadence (v4 → v5 → v6, each tracking a Laravel major) must be budgeted as recurring platform work, not incidental maintenance. Mago replaced Pint for internal lint/format, indicating active toolchain churn on the contributor side — usually invisible to consumers, occasionally not.

Support. MIT-licensed, single-vendor stewardship by Roots, funded through sponsorship and commercial products. Support channels are public Discourse plus a sponsor-only Discord; there is no commercial SLA. That is acceptable for a marketing-site estate with in-house PHP capability and unacceptable where a vendor escalations path is a procurement requirement. Community packages are individually maintained — treat each as its own support risk with its own bus factor.

Scaling. Per-request container boot and provider registration add overhead; mitigate with route/config caching, OPcache, and disciplined provider registration (avoid heavy providers on front-end requests). Two caching layers can coexist (WP object cache and illuminate/cache) — choose one deliberately or you will create coherence bugs under load. Queue support exists but requires a long-running worker, which most managed WordPress hosts do not provide; if background jobs matter, confirm the hosting model before designing around illuminate/queue. Redis is explicitly unsupported as a component, so the cache/session backend story is WP-native or nothing.

Failure modes, ranked by blast radius.

  • Version mismatch fatal — PHP below the floor or a Laravel/Acorn mismatch. Because Acorn loads as an mu-plugin, failure is site-wide, including admin. Requires a staging-parity gate and a documented kill switch (disable the mu-plugin loader) that a non-developer can execute.
  • Request lifecycle regression — superglobals, canonical redirects, login/admin exclusions. Historically the highest-frequency severe bug class; demands a standing regression checklist per upgrade, not ad-hoc smoke testing.
  • Plugin conflict — competing hooks on parse_request/template_redirect. Detect in staging with the full production plugin set, never a curated subset.
  • Asset pipeline failure — missing or stale Vite manifest surfaces as Blade exceptions on render.
  • Unsupported-component misuse — mail, notifications, translation, Redis failing at runtime after a copy-paste port.

Ramp-up. Developers with Laravel experience reach productivity in days; the mental model transfers almost entirely. WordPress-only developers need Blade syntax, service providers, the container, and Composer workflows — realistically 2–4 weeks to independent competence, with lifecycle debugging taking longer. Documentation quality (roots.io/acorn docs, per-major upgrade guides, a What's New post per major) is a genuine asset and lowers onboarding cost. Budget one named owner, a written upgrade runbook, and a staging environment that mirrors production plugins. Net TPM read: adopt where Roots tooling already exists or a greenfield build is on the table; pilot narrowly otherwise; decline for estates that cannot enforce PHP 8.3+, cannot run Composer in CI, or depend on mail, notifications, or multilingual translation.

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.
thuraaung2493/laravel-rulecraft
cyberwizard/schedule-catchup
livetennisapi/livetennisapi-laravel
roundly-consulting/notifications-for-laravel
flightsadmin/bootstrap-starter-kit
lasserafn/laravel-intempus
likyly/sdk
tdt/input
coreation/php-shapefile
coreation/gisconverter
primix/widgets
primix/notifications
primix/actions
primix/tables
primix/details
primix/forms
primix/support
marcelgwerder/laravel-api-handler
firebrikdotcom/conveyor-laravel-broadcaster
kanata-php/conveyor-laravel-broadcaster