
Migrating from PHP to Node.js in 2026 typically costs $40,000 to $500,000 depending on the pattern you choose. A small API-only re-platform runs $40k to $150k, a route-by-route strangler-fig migration runs $80k to $300k over 6 to 12 months, and a full rewrite of a complex monolith runs $150k to $500k. Most teams should not migrate at all.
The honest answer to "should we move off PHP" in 2026 is "probably not, unless you have a specific reason." Laravel 11 and modern PHP 8.3 are fast, well-supported, and shipping new features for years to come. If you are migrating because Node.js feels more modern, you are about to spend six figures on a vibe.
There are real reasons to move. There are also fake ones. Be honest about which you have before signing anyone's invoice.
Good reasons to migrate:
Bad reasons to migrate:
If your reason is in the second bucket, stop reading and go ship a feature. If it is in the first, the rest of this post is for you.
There are three ways to migrate, and the cost difference between them is roughly 10x from cheapest to most expensive. Picking the right pattern matters more than picking the right framework.
| Pattern | Cost | Timeline | Best for | Risk |
|---|---|---|---|---|
| Full rewrite | $150k to $500k | 4 to 12 months | Small apps, end-of-life PHP versions, hard schema changes | High. Two codebases to maintain mid-flight. |
| Strangler-fig (route-by-route) | $80k to $300k | 6 to 12 months | Mature apps with traffic, can't afford a freeze | Medium. Slow but safe. |
| API-only re-platform | $40k to $150k | 2 to 5 months | Apps where the frontend is already a separate SPA | Low. Smallest blast radius. |
The numbers above assume you book engineering through an on-demand marketplace at mid-to-senior rates. Agency quotes for the same scope land 2-3x higher. Big-4 consultancies will quote 5-10x higher and deliver the same thing six months later.
You start a green-field Node.js project, port features over in priority order, and cut over in one switch when the new app reaches parity. The old codebase goes into maintenance mode the day you start.
This works for small apps (under 30k lines of PHP) or apps where the data model is changing anyway. It does not work for apps with 200+ database tables, custom business logic accumulated over a decade, or anything regulated.
A realistic cost breakdown at this scale:
Total: $135,000 on the low end. Add another $100k to $300k if your PHP app has 5+ years of legacy code, heavy use of stored procedures, or custom payment logic.
Most full rewrites also blow their timelines by 50% to 100%. Budget accordingly.
Named after Martin Fowler's pattern, the strangler-fig wraps your existing PHP app behind a reverse proxy (nginx, Caddy, or a small Node.js gateway). New endpoints get built in Node.js. Old endpoints get migrated one at a time. The proxy decides where each request goes.
This is the right choice for any production app with active users. You ship the migration in slices, each one independently shippable and rollback-able. There is no big-bang cutover.
The work breaks down like this:
A typical 6-month strangler-fig with 2 senior engineers and 1 mid engineer runs $130k to $180k. Bigger apps with 100+ routes can stretch to 12 months and $300k.
The trap with strangler-fig is that teams stop halfway. The project becomes "we are partially on Node.js" forever, which is operationally worse than either pure stack. Plan the full completion before you start, or do not start.
If your PHP app is mainly a JSON API that talks to a React or Vue SPA, you have the cheapest migration on the menu. You rewrite the API in Node.js (typically Fastify, Hono, or NestJS), keep the same database, and switch the SPA's API base URL.
This works because the contract is already defined. You are not redesigning anything. You are rewriting the same OpenAPI spec in a different language.
A realistic cost breakdown:
Total: $30,000 to $40,000 for a small-to-medium API (50 to 100 endpoints). Larger surfaces push toward $100k. The pricing for other migration projects like MySQL to Postgres follows a similar engineer-hour calculation.
The cost overruns on PHP-to-Node.js migrations almost always come from the same five places. Budget for them up front or get surprised later.
Eloquent (Laravel) and Doctrine (Symfony) are mature, opinionated ORMs. Prisma, Drizzle, and TypeORM each do things differently. Your PHP code that uses $user->orders()->whereHas('items', ...) does not have a one-line equivalent. Expect to redesign 20-30% of your data access layer, not just translate it.
Worst case: you have raw SQL embedded in PHP strings that depends on MySQL-specific functions. Each one needs to be ported and tested.
PHP's $_SESSION is server-side, file-backed by default, and "just works." Node.js has no built-in session store. You have to pick one (Redis, Postgres, a JWT, a signed cookie) and deal with the consequences.
If your PHP app uses session_regenerate_id() for security, the Node.js equivalent is several lines of code per route. If you have CSRF protection via Laravel's middleware, you need to rebuild that with a library like csurf or move to SameSite cookies plus a custom-header check.
PHP scripts often write to local disk: cached views in storage/framework/views, uploaded files in public/uploads, queue payloads in storage/app. On a single VPS, this works. In a containerized Node.js deployment, it does not.
Plan to move every file-system write to S3-compatible storage (S3, R2, Backblaze) before you migrate. Otherwise, you will discover the problem at 3am after a deployment.
PHP-FPM kills requests after max_execution_time (default 30 seconds). Node.js does not have this safety net. A bug that would have been a 500 error in PHP becomes a memory leak in Node.js.
If you use Laravel queues, you will need to rebuild your workers in BullMQ, Inngest, or Trigger.dev. The cost of the queue runtime itself is usually under $50/month, but the engineering time to migrate jobs is real.
PHP's == and null coercion are forgiving. TypeScript's strict mode is not. Code that "worked" in PHP will reveal latent bugs in Node.js. This is good in the long run, painful in the short.
Repeat after me: PHP Laravel is fine in 2026. So is Symfony. So is even WordPress for content sites. The PHP that runs Facebook, Slack, and Etsy is the same language you are running, with newer syntax.
If you are migrating because of one of these reasons, stop:
Pick a different fight. Improve your PHP test coverage, upgrade to PHP 8.3, add Pest or PHPUnit, deploy with Forge or Ploi. You will get 80% of the benefit at 1% of the cost.
The teams that ship migrations under budget tend to do the same five things:
If you have decided to migrate, here is the practical sequence we recommend:
Need someone who has done this before? Book a senior engineer on Cadence for $1,500/week. Every engineer is AI-native, vetted on real migration work, and you get a 48-hour free trial before billing starts.
For comparison, similar projects in adjacent stacks like the Next.js application build follow the same engineer-hour math.
Plan for 2 to 5 months for an API-only re-platform, 6 to 12 months for a strangler-fig migration, and 4 to 12 months for a full rewrite. Most migrations blow their initial timeline by 50%, so add a buffer.
TypeScript, every time. The type system catches the class of bugs that PHP's loose typing was hiding. The migration cost is barely higher (Cursor and Claude Code generate types accurately) and the long-term maintenance is much cheaper.
For most teams: NestJS if you want a Laravel-style opinionated framework, or Fastify if you want lightweight and fast. Hono is excellent for edge deployments. Avoid Express for new projects; it is in maintenance mode.
Yes, with the strangler-fig pattern. A reverse proxy routes each request to either the old PHP app or the new Node.js service. Users see no difference. You can run both stacks in parallel for months.
Usually no. For typical CRUD apps, your bottleneck is the database, not the runtime. Profile first. If your PHP app is slow, it is almost always slow queries, missing indexes, or N+1 problems. Fix those before considering a rewrite.
This is the underrated cost of migration. If your engineers know PHP well and Node.js poorly, you are trading expertise for vibes. Either invest in serious Node.js training first (2 to 3 months of paired work) or book engineers who already know the new stack. Mixing both leads to bad code.