Postgres plans: how they tie to WHMCS products

Plans are what customers buy. Each plan declares tier, instance size, storage, connections, Postgres version, and price — and syncs to a WHMCS product with one click.

Last updated 20 days ago

Postgres plans: how they tie to WHMCS products

A plan in ImpulseDB Postgres is the thing customers buy. Each plan declares everything that defines the offering — tier (dedicated VPS or shared), instance size or shared-server pin, storage quota, connection cap, Postgres version, optional read replica, region, lifetime, and price. The Plans tab in the admin is where you build and maintain them.

The fields that matter

Open Addons → ImpulseDB Postgres → Plans and edit any plan:

  • Name & Slug — customer-visible name and a stable internal identifier.
  • Typeshared or dedicated.
  • Shared Server (shared only) — pin every customer on this plan to a specific server, or leave as Auto to route by region.
  • VPS Plan (dedicated only) — click Find Best Server Size to query the active provider, or paste a slug directly (Vultr vc2-2c-4gb, Hetzner cx22, DO s-2vcpu-4gb, Linode g6-standard-2).
  • DB Storage / Connections / Backups — the quotas you're selling. Storage is hard-capped per database on shared; connections cap at the PgBouncer pool.
  • Extensions tier — the whitelist of extensions the customer can CREATE EXTENSION on their database.
  • Replica VPS & price (dedicated only) — optional read replica plan plus the monthly price the customer pays for the replica addon.
  • Monthly / Annual price — customer-facing price in your default WHMCS currency.

The Plans table also shows a live infrastructure cost column pulled from the active provider's API, your customer price, and the resulting margin. Tweak the price and the margin updates in real time.

Shared server routing

Shared plans have two routing strategies:

  • Pinned — every customer on this plan goes to the named server regardless of region. Useful for separating tiers onto different hardware.
  • Auto (default) — route by region: first the region's default server, then any server in the region with capacity, then a cross-region fallback.

A [PINNED] or [AUTO] badge in the Infrastructure column shows which strategy each shared plan uses.

Sync to WHMCS

Click Sync All Plans to WHMCS. The addon creates one WHMCS product per plan, wires it to the ImpulseDB Postgres server module, generates configurable options for region selection, and sets the description, pricing cycles, and welcome-email template. Re-running sync is idempotent — existing products are updated in place.

Edit or delete every example plan before going live. A yellow banner appears on the Plans tab whenever any example plan still exists, and example plans are blocked from syncing until you give them real names and prices.

Hiding unwanted variants

WHMCS configurable options generate one suboption per region or variant. Some WHMCS themes scan every suboption regardless of the hidden=1 flag, so flagging alone isn't enough — the option still shows up on the order form.

The reliable fix is SQL. Hide a single variant against tblproductconfigoptionssub:

UPDATE tblproductconfigoptionssub SET hidden = 1 WHERE optionname = 'eu-west' AND configid = 42; 

Or delete it outright if you're certain you'll never offer that variant:

DELETE FROM tblproductconfigoptionssub WHERE optionname = 'eu-west' AND configid = 42; 

Run on a backup first, and check the order form in an incognito session to confirm the variant is gone for the affected theme.

Related