Replies: 3 comments 10 replies
|
For some context: we had some thoughts of doing this with Durable Objects, which effectively provide a database per object (and each object would represent its own tenant). It's actually how the demo site works: when you open it, you are given a new site running on its own Durable Object for 1hr. The problem is that Durable Objects are not really built for that fan-out effect that you're describing, and WordPress's attitude of treating all sites as siblings in the same database makes a bit more sense for that. |
|
Adding my case here, as suggested on Discord. I run an agency on WordPress multisite. The part of multisite I actually use is operational, not runtime: dozens of client sites on one core — one upgrade, one place to provision a new site in minutes, one dashboard to see them all. Each site is otherwise fully independent: own domain, own content, own users — and crucially its own schema. Different clients get entirely different content types and fields, defined at runtime in the admin; they don't share a schema package. (This is also why I'm here rather than on code-first-schema CMSs: EmDash keeping the schema in the database is exactly what a multi-client setup needs.) I'm moving the frontends to Astro and would love EmDash to be the backend for all of them, so I'm trying to understand where this lands before building tooling around N independent deploys. A few things changed since this thread went quiet in April, and I think they're relevant to the original objection:
On the fan-out concern from the first reply — I think it's right if the DOs are the whole system. But in a hosted-N-sites setup, the cross-site operations (list sites, usage, upgrade orchestration, billing) naturally live in a small control plane (a D1 table mapping hostname → site), and per-site DOs hold only that site's content. The fan-out never touches the DOs. The WordPress model (all sites as siblings in one database) buys cross-site SQL, but pays twice: row-level scoping discipline in every query (#2575 recently showed how that fails silently when the discipline slips), and a harder story for per-site schema — sibling sites sharing one database can't each have their own So instead of asking for multi-tenancy in core, a much smaller question: Would you accept making the DO instance name request-resolvable? e.g. And if the answer is "no — run one deploy per site and orchestrate upgrades yourself (monorepo + CI matrix, or Workers for Platforms past the account script limit)", that's genuinely useful to know too: it means the ecosystem should build that orchestration layer as tooling around EmDash rather than wait for a Network feature. Happy to do the work behind either door. |
|
I think a plugin injection point for prefix and db resolution is the best way to do this, while multi-instance is basically free, it add unnecessary complexity to maintain the database, user should also be able to use a CAS for media lib |
Uh oh!
There was an error while loading. Please reload this page.
I am looking to manage multiple independent sites from a single EmDash installation/monorepo. Currently, EmDash appears focused on single-instance deployments. For devs managing dozens of client sites/properties, maintaining separate deployments for each site increases DevOps overhead and complicates global updates.
I would like to see native multi-tenancy support (similar to Payload CMS), allowing a single EmDash instance to:
Identify tenants via domain name or request headers.
Isolate data using either a shared database with tenantID scoping or separate D1 databases per tenant.
Shared Codebase: Update the core CMS logic in one place (the monorepo/Worker) and have it reflect across all tenant sites immediately.
Tenant-specific Configuration: Allow different themes or plugin settings based on the active tenant.
All reactions