tiny-pixel/acorn-db
Acorn DB brings Laravel-style database tooling to WordPress. Use Eloquent models, migrations, and a fluent query builder to manage custom tables and query data with a familiar, expressive API inside Sage themes and Acorn-powered plugins.
WP_Query, or standardize on Eloquent models over WordPress core tables? Adopting it is a real architecture decision — it defines the contract every feature touches — so it belongs in a technical spike, not a sprint ticket.WP_Query arrays. This is the strongest strategic justification for the dependency.save_post, cache invalidation, plugin side effects) stops being automatic. Scope features accordingly before committing.WP_Query sprawl. Legacy Sage themes tend to accumulate query logic across templates. Standardizing on models is a credible migration target and gives you a measurable refactor epic.Adopt when all of the following hold:
Look elsewhere — or stay on WP_Query — when:
wp_insert_post/wp_update_post, which means hooks, revisions, autosaves, notifications, and third-party plugin listeners may not fire. If your product depends on those, either keep writes in WordPress APIs or budget for carefully re-firing hooks.WP_Query may simply be faster, and you should measure before you standardize.Executive summary. This is a small open-source adapter that lets our Laravel-style WordPress stack (Acorn/Sage) talk to WordPress content using Laravel's standard database models instead of WordPress's native query functions. It is a developer-experience play, not a customer-facing feature: it shortens time-to-market on decoupled/headless builds and makes Laravel engineers productive on WordPress faster. The trade-off is real — the package has a small maintainer base and no meaningful downstream adoption, so we should treat it as code we may have to own rather than a vendor we can lean on. Recommendation: adopt for read-side content access in a time-boxed spike, keep writes on WordPress's native APIs, and make a keep/fork/replace call once we've validated it against our actual content model.
For engineering. You get first-class models for posts, meta, terms, users, and comments, with relationships — a natural fit for Blade views, API resources, and tests where WP_Query arrays are painful. You inherit risk: writes bypass WordPress hooks and cache invalidation, meta is EAV and prone to N+1, and custom/plugin tables need hand-rolled models. Pin the version, read the source, wrap it behind our own repository interfaces so it stays swappable, and benchmark against WP_Query on representative data before we commit.
How can I help you explore Laravel packages today?