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

Wp Orm Laravel Package

dbout/wp-orm

A lightweight ORM for WordPress that brings an Eloquent-style experience to custom tables and posts. Define models, query with a fluent builder, and handle relationships without raw SQL, while staying fully compatible with the WordPress ecosystem.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Verdict: A narrow-fit, single-maintainer bridging library. Worth a 2–3 day spike only if the roadmap includes WordPress as a first-class data source; otherwise it is noise in the dependency graph.

Architecture fit

  • Solves one specific problem: exposing WordPress's wp_posts/wp_postmeta/wp_users/wp_options/wp_terms schema through Eloquent models (Post, User, Term, Comment, Option, Attachment) with relationships and eager loading. It is a data-access layer, not a WordPress abstraction — it does not touch hooks, rewrite rules, admin UI, or the template hierarchy.
  • Fits two scenarios: (a) a Laravel or plain-PHP codebase that needs to read/write a WordPress database directly for reporting, search, bulk migration, or headless delivery; (b) a WordPress plugin/theme where the team wants Eloquent ergonomics instead of $wpdb/WP_Query string-building.
  • Does not fit a pure Laravel product, nor a WordPress site whose behavior depends on WP_Query filters — which is most non-trivial WordPress sites.

Integration feasibility

  • Mechanically straightforward: composer require dbout/wp-orm, bootstrap Eloquent's Capsule against WordPress's $wpdb constants, define models. In a Laravel host you would instead register a second named connection and let the package's models resolve against it, avoiding a duplicate Capsule.
  • Must be initialized after WordPress is loaded; autoloading before wp-config.php resolves will fail. This ordering constraint complicates plugin bootstrap and any code shared between WP-CLI, cron, and web requests.
  • Relationship support across postmeta/term relationships is where the value is — eager loading measurably reduces the N+1 explosion typical of hand-rolled get_post_meta loops.

Technical risk (ranked)

  1. Bypassing WP_Query bypasses the ecosystem. Multilingual plugins (WPML/Polylang), page builders, WooCommerce, and search indexers attach behavior at the query and hook layer. Eloquent reads can return content the rest of the site considers filtered, translated, or private. This is the failure mode that generates support tickets, not crashes.
  2. Write-path hazard. Eloquent writes skip save_post, wp_insert_post, revision creation, and object-cache invalidation. Any Eloquent write to wp_posts must be treated as an advanced, reviewed operation with explicit hook firing.
  3. Bus factor of one. 132 stars and zero dependents means near-zero community validation; the maintainer is the entire support surface. MIT license mitigates by permitting a fork.
  4. Version coupling. Depends on a specific illuminate/database major. WordPress installs frequently pin older PHP than a current Laravel supports. The compatibility matrix (package × Eloquent major × PHP × WP version) is undocumented enough that we must own it.
  5. Release metadata anomaly. The listed last release date (2026-10-01) is in the future. Either the metadata pipeline is wrong or the tag is misdated. Verify tag provenance and commit history before pinning anything.

Key questions for the maintainer / spike

  • Which illuminate/database majors and PHP floors are supported, and what is the stated support window?
  • Multisite behavior: does it honor $wpdb->base_prefix and switch_to_blog()?
  • Are reads cache-aware (WP object cache / persistent cache), or do they always hit MySQL?
  • Is there any documented guidance on firing WordPress hooks alongside Eloquent writes?
  • Do the bundled models apply global scopes for post type/status, and can they be disabled safely?
  • Committer diversity and median issue response time over the last 12 months.

Integration Approach

Stack fit

  • Green light: headless WordPress or a Laravel admin/reporting service reading WP data; migration and ETL tooling; bulk content operations where WP_Query pagination is the bottleneck.
  • Amber: plugin/theme development where the team is Eloquent-fluent but WordPress-inexperienced — productivity gain is real, convention-drift risk is higher.
  • Red: customer-facing rendering on a site with multilingual, e-commerce, or builder plugins; anything where "the REST API is too slow" is the only justification, since caching usually beats ORM rewrites.

Migration path

  1. Read-only first. Introduce the package behind an internal repository interface for reporting/export/admin screens. Never let Eloquent models leak into domain code — the interface is the fork/removal seam.
  2. Measure. Compare query count and wall time against the existing WP_Query + object-cache path on production-shaped data. If the win is under ~30% on the hot path, stop; the complexity isn't paying rent.
  3. Writes last, and only with a hook-firing wrapper that calls save_post/clean_post_cache explicitly after each write, plus an integration test that asserts a cache invalidation occurred.

Compatibility

  • Pin exactly, commit composer.lock, and add the package to the dependency-review list (single maintainer + low adoption = periodic re-evaluation).
  • Run a CI matrix: {WP LTS, WP current} × {PHP floor, PHP current} × {supported Eloquent major}. This is the artifact that makes the dependency defensible in a review.
  • Keep the package out of the critical bootstrap path so a WP-CLI or cron context can degrade gracefully.

Sequencing Spike (2–3 days: bootstrap, three representative read queries, one relationship-heavy query, one measured benchmark) → design review with a WordPress-fluent engineer → read-only integration (1–2 sprints) → write path only if a concrete requirement forces it → document the fork procedure as a contingency.

Operational Impact

Maintenance

  • Budget roughly 2–4 hours per quarter for version-watch and compatibility verification, plus a half-day per Eloquent major bump. Low, but nonzero and non-optional given zero dependents — we will not learn about breakage from the community.
  • MIT + small surface area means forking is viable. Pre-decide the trigger (e.g., "no release for 12 months and a blocking Eloquent incompatibility") so the decision isn't made under pressure.

Support

  • No commercial support, no SLA, issues-only channel. Internal ownership must be assigned by name; "the Laravel team" is not an owner.
  • Expect to answer our own questions about multisite, caching, and hook semantics from source reading.

Scaling

  • The EAV postmeta join is WordPress's classic scaling cliff. Eager loading fixes N+1 but not missing composite indexes or wp_postmeta bloat. Benchmark at production row counts, not on a 200-post dev site.
  • Bypassing the object cache shifts load to MySQL. On high-traffic sites this can convert a cache-hit page into dozens of database round-trips — the opposite of the intended optimization. Always benchmark with the persistent cache enabled.
  • Bulk writes through Eloquent are fast and therefore easy to run at a scale that locks tables. Require batching and off-peak execution.

Failure modes to monitor

  • Stale caches and search indexes after Eloquent writes (silent, user-visible, hard to trace).
  • Untranslated or unfiltered content appearing in admin/reporting views.
  • Divergence between Eloquent-visible data and plugin-modified data after a plugin update.
  • Multisite prefix mistakes writing to the wrong blog's tables — data-corruption class, needs a guard.
  • Schema drift in a future WordPress release breaking bundled models.

Ramp-up

  • A Laravel-fluent developer is productive in about a day and dangerous by the end of week one: the API feels familiar, so the WordPress-specific constraints (hooks, caching, query filters) get skipped precisely because nothing errors.
  • A WordPress-fluent developer unfamiliar with Eloquent needs roughly the same time in the other direction.
  • Plan ~1 week to first safe read-only contribution and ~3–4 weeks before anyone is trusted with the write path. Pair the two skill sets on the first integration; do not staff it with Laravel-only or WordPress-only.
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.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums