← back to work
Migration

Multi-environment cloud migration for a multi-tenant SaaS platform

Migrated a multi-tenant SaaS platform's three environments off legacy, manually-provisioned VMs to a modern cloud setup, diagnosing a database driver incompatibility along the way that was blocking every newly-provisioned environment.

Context

A B2B SaaS client running a multi-tenant architecture (one database schema per tenant, plus a central control schema) across three environments — development, staging, and production — on legacy VM infrastructure that had been provisioned and maintained mostly by hand for years. The goal: migrate all three environments to a different cloud provider with a repeatable, documented process, without interrupting active tenants.

Challenge

The initial audit surfaced both infrastructure and application debt: environment drift between dev, staging, and production; fully manual provisioning with no scripts or runbooks; and a database authentication-plugin incompatibility between the newer MySQL default and the legacy PHP/PDO driver that broke every freshly-provisioned environment until fixed by hand.

What I did

Stack

MySQL (multi-tenant, schema-per-tenant), legacy PHP application, in-memory queue/cache, server provisioning/orchestration tooling, IaaS-to-IaaS/PaaS cloud migration with a managed-services optimization phase.

Outcome

Migrated all three environments with zero tenant data loss, fixed IPs, working SSL, and a documented, repeatable deploy runbook. The optimization phase that followed cut monthly infrastructure cost by decoupling storage and database from compute, with a payback estimated under two months.