Skelars PHP to Go Migration

Skelar runs several products across different markets, and some of them handle a fairly large amount of traffic every day. Once systems reach that point, backend choices start showing up in places the business actually notices, server costs, response times, deployment issues, and the amount of engineering time spent keeping services stable.

A number of older internal services were built with PHP. That setup made sense early on because it was fast to develop with and easy to scale during the first growth stages. But as some products grew, certain services became harder to maintain efficiently. Queue workers needed constant tuning, memory usage became less predictable under load, and adding new features to heavily coupled codebases started slowing teams down.

Because of that, some newer backend services began moving to Go. The migration did not happen all at once, and there was never a plan to rewrite everything from scratch. Most teams only replaced parts of the system that were already causing operational problems or becoming expensive to maintain.

The interesting part is that the biggest improvements were not always raw speed. In several cases, the bigger benefit came from reducing infrastructure usage, simplifying concurrent workloads, or making services easier to reason about during high-traffic periods.

This article looks at the migration process from a practical engineering perspective: what usually triggers the move from PHP to Go, which parts of a system are worth migrating first, what problems tend to appear during the transition, and where the trade-offs are not as obvious as they seem at first.

Why Companies Are Migrating from PHP to Go in 2026

PHP is still everywhere, and for a lot of products it works perfectly fine. Plenty of companies continue building on Laravel or WordPress without major issues, especially when the application is mostly content-focused or follows a fairly standard request-response flow. There is a reason so much of the web still runs on it.

Most teams also do not wake up one day and decide to migrate because they suddenly dislike PHP. Usually there is a specific system that starts becoming difficult to operate at scale.

Sometimes it is an API layer struggling during traffic spikes because too many PHP-FPM workers are running at the same time. In other cases, the problems show up after adding features that were never part of the original architecture. A platform that started as a simple marketplace begins introducing live notifications, streaming events, chat, or real-time tutoring sessions, and suddenly the old setup needs far more infrastructure than expected just to stay responsive.

At that point, teams are not really debating programming languages in the abstract anymore. They are trying to reduce latency, lower infrastructure pressure, and avoid spending half their engineering time tuning systems that used to work fine a year earlier.

That is where Go enters the picture.

Pain Point in PHP at ScaleWhat Go Changes
One process per request via PHP-FPM, capped by RAMLightweight goroutines, thousands per process
Bootstrapping the entire framework on every requestLong-running compiled binary, no cold start per call
Vertical scaling hits a wall fastBuilt for horizontal scaling with low memory per instance
Loose typing causes runtime surprisesStatic typing catches errors at compile time
Deployment requires PHP runtime plus extensionsSingle self-contained binary

The same themes show up in a lot of migration write ups. When Beyn Technology shared details about moving from PHP to Go, the team pointed to a few practical improvements: better performance, simpler deployments, and stronger test coverage. A separate SitePoint article covering a Laravel-to-Go rewrite described a similar outcome, with the rewritten service ending up noticeably smaller and faster than the original PHP version.

For companies managing multiple products at the same time, improvements like that affect more than a single application. If backend services can handle higher traffic with fewer resources, the operational impact carries across the entire product portfolio.

Skelar’s Engineering Context: Why Go Fits a Venture Builder

Part of the reason PHP to Go migration keeps appearing in Skelar’s engineering discussions is the way the company itself operates. Skelar is not built around a single application or platform. Since 2015, the company has launched multiple tech businesses while relying on shared engineering, analytics, and operational teams across the portfolio.

That model creates two structural pressures that push backend choices toward Go:

Speed of new product launches

Skelar has mentioned publicly that some MVPs are launched in roughly 40 days. Working at that pace usually favors tools that are straightforward to build and deploy with. Go fits that environment well because the language is relatively simple, compile times are fast, and teams can start building services without adding much framework complexity upfront.

Shared infrastructure across the portfolio

The infrastructure side matters too. When multiple products share the same Kubernetes environment, monitoring stack, and DevOps resources, efficiency gains add up quickly. Go services often use less memory than comparable PHP services, which can reduce infrastructure usage across the broader platform.

The company’s hiring activity reflects that shift pretty clearly. Skelar continues hiring PHP engineers to support existing systems, but there is also a visible push toward Golang roles focused on scalable backend development. In practice, that usually means newer services are being built in Go while older PHP systems are phased out gradually instead of replaced all at once.

For more context on how SKELAR approaches engineering as a competitive advantage across portfolio companies, see the Skelar engineering careers page.

Performance Benchmarks: PHP vs Go in Production

Benchmarks are tricky because they depend heavily on the workload, the framework, and the tuning. But the directional gap between PHP and Go at the backend layer is wide enough that it shows up in almost every public comparison.

Here is a synthesized view of the numbers most often cited in production case studies and independent tests:

MetricModern PHP 8.3 (with OPcache)Go 1.22+Typical Delta
Requests per second on a simple JSON API4,000 to 8,000 RPS25,000 to 60,000 RPS5x to 8x in Go’s favor
Memory per concurrent connection8 to 20 MB per worker4 to 8 KB per goroutineRoughly 1,000x lighter in Go
Cold-start latency30 to 80 ms (framework boot)1 to 5 ms (compiled binary)10x to 30x faster in Go
Container density on a 4 GB node6 to 10 PHP-FPM pods30 to 60 Go pods4x to 6x higher in Go
Startup time200 to 800 ms (Laravel)5 to 50 msOrder of magnitude faster

Request Throughput and Latency

A big part of Go’s performance advantage comes from how the language handles execution and concurrency. Since Go is compiled, services run as native binaries instead of interpreting application code during requests. The concurrency model is also very different from the traditional PHP-FPM approach. Go uses lightweight goroutines managed by its own runtime, which makes it possible to handle a large number of concurrent tasks within a single process.

That difference becomes especially noticeable in services that rely heavily on parallel work, such as external API calls, background processing pipelines, or WebSocket connections. In workloads like those, PHP applications often need significantly more workers and infrastructure to maintain the same throughput.

One example shared publicly by developer Roelof Jan Elsinga described a data-processing workload that originally took hundreds of hours in PHP. After moving the concurrent portion of the system to Go, the runtime dropped to a small fraction of the original processing time.

Memory and Infrastructure Cost

Memory matters because cloud costs often scale with the number of container instances running. Several migration reports have shown Kubernetes node counts dropping by more than 50 percent after moving resource-heavy backend services from PHP to Go. A simple example shows why. If a PHP-FPM pod needs 1 GB of memory for a workload and a Go pod handles that same workload using 150 MB, the same capacity can support five or six Go pods instead of one.

For a product portfolio like Skelar’s, the effect adds up over time. A 40 percent infrastructure cost reduction on one product improves spending efficiency. Repeating that across ten products can create a meaningful operational advantage.

Migration Strategy: Incremental, Not Big-Bang

One of the most common mistakes during a PHP-to-Go migration is approaching it as a full rewrite. Teams often allocate months for the effort, pause changes in the PHP codebase, and expect the Go version to replace everything at launch. In practice, this often leads to delays, missing fixes that continue landing in PHP, and frustration around the migration process.

Teams that complete migrations successfully usually take a different approach: moving incrementally. The PHP application stays in production while individual pieces of functionality are moved to Go over time. Both systems run in parallel until the new service has been tested under real conditions, after which traffic can be shifted over.

The Strangler Fig Pattern in Practice

The strangler fig pattern, named by Martin Fowler, is the standard migration playbook for this. The idea is to wrap the old system, redirect specific routes or features to a new service, and gradually shrink the old system until it can be retired.

In a PHP to Go migration, it looks like this:

  1. Put an API gateway or reverse proxy (usually NGINX or Traefik) in front of the existing PHP application
  2. Identify the highest-leverage service to migrate first, usually a hot endpoint that is causing performance pain
  3. Build that service in Go, deploy it next to the PHP app, and route the relevant traffic to it through the gateway
  4. Validate with real production traffic, often using shadow traffic first
  5. Promote the Go service to primary, keep PHP as a fallback for one or two releases
  6. Repeat for the next slice

This is the approach to the open-source fcgi_ext project on GitHub documents for LEMP-stack migrations, where a Go daemon handles FastCGI requests from NGINX alongside the existing PHP-FPM. It is also the pattern most engineering teams reach for once they realize a full rewrite is going to take too long.

Dual-Running PHP and Go Services

While the migration is in flight, both stacks have to coexist cleanly. The non-negotiables are:

  • Shared database. Both services read and write the same data stores, usually PostgreSQL, MySQL, or MongoDB
  • Shared session state. Redis is the de facto choice for shared sessions and caching across PHP and Go
  • Consistent authentication. Either centralized JWTs or a shared session backend so users do not get bounced between services
  • Unified observability. Same logging format (structured JSON), same tracing (OpenTelemetry), same metrics (Prometheus) across both stacks

The teams that struggle here are usually the ones that try to keep two parallel auth systems running. Solve that on day one and the rest of the migration gets dramatically easier.

Framework Mapping: Laravel and Symfony to Gin, Echo, and Fiber

A practical question every migration team hits in week one is which Go framework to use. The PHP world has clear defaults, Laravel and Symfony for the most part. The Go world is more fragmented, but three frameworks dominate production usage:

PHP FrameworkClosest Go EquivalentWhy It Works
LaravelGin or EchoMiddleware-driven, fast, large community
SymfonyEcho or the standard net/http libraryCloser to Symfony’s structured, modular feel
Lumen (Laravel API)FiberDesigned for high-throughput APIs, Express-like API
CodeIgniterGinMinimal, opinionated, easy to learn
SlimChi or EchoLightweight routing, middleware-focused

A few practical notes from teams that have done the mapping:

  • Routes translate cleanly. Laravel’s Route::get(‘/users/{id}’, …) maps almost one to one to Gin’s router.GET(“/users/:id”, handler)
  • Eloquent ORMs do not translate cleanly. Many migration teams move away from heavy ORMs entirely and use lighter libraries like sqlx, sqlc, or GORM only for specific cases. The author of the SitePoint case study explicitly chose plain SQL with meddler over a full ORM
  • Blade templates need to be rewritten. Go’s html/template package is the standard alternative, and wrappers like grender exist to support hierarchical templates similar to Blade
  • Service container patterns are not idiomatic in Go. Most teams replace Laravel’s IoC container with plain dependency injection through constructor functions

For teams looking at the cleanest possible migration path, Gin is the most common landing point for Laravel teams because it preserves the middleware-and-handlers mental model.

Database, Caching, and Shared Infrastructure

The good news about migrating from PHP to Go is that almost nothing about your data layer needs to change. PostgreSQL, MySQL, Redis, MongoDB, and Elasticsearch all have mature, well-maintained Go drivers. The migration is almost always at the application layer, not the persistence layer.

The practical considerations are:

Connection pooling

PHP-FPM creates a fresh database connection per worker. Go uses a connection pool inside a long-running process. You will usually need to tune pool sizes downward when migrating, because one Go service can hold far more concurrent connections than you might expect.

Redis as the shared backbone

Redis is the most common bridge between PHP and Go during migration. Both can read and write the same sessions, queues, and caches without any data format translation.

Queue workers

If you use Laravel queues or a similar PHP-side worker model, you have two options. Run Go workers against the same queue backend (Redis, RabbitMQ, or AWS SQS), or migrate queue producers and consumers as a coordinated unit. The second is cleaner but requires more planning.

Schema changes during migration

Avoid them where possible. The migration is already complex. Adding schema changes on top is asking for production incidents. Use a tool like dbmate (written in Go) or stick with your existing PHP migration tool until the cutover is complete.

Concurrency: Goroutines vs PHP-FPM Workers

This is the section where the technical case for Go is usually decided. PHP’s concurrency model is based on processes. Every request gets its own PHP-FPM worker. That worker handles one request at a time and is held in memory until it is done.

Go’s model is the opposite. A single Go process spawns goroutines, which are lightweight units of concurrency scheduled by the Go runtime. A goroutine costs roughly 4 to 8 kilobytes of memory at startup. A PHP-FPM worker costs roughly 10 to 30 megabytes.

ScenarioPHP-FPM BehaviorGo Behavior
1,000 simultaneous slow API callsRequires 1,000 worker processes, hundreds of MB of RAMOne Go process, 1,000 goroutines, a few MB total
Fan-out to 10 external services per requestSequential or requires complex async librariesgo keyword spawns concurrent calls natively
WebSocket server with 10,000 connectionsEffectively impossible without separate stackStandard pattern in Go
Background scheduled jobsRequires Supervisor or cron plus PHP CLIBuilt into the same Go binary as a goroutine

For Skelar’s portfolio, which includes consumer apps with high concurrent user counts and marketplaces with real-time features, goroutine-based concurrency is the single most important reason to migrate. It is not a 10 percent improvement. It is a structural change in what kinds of features the team can build at all.

Risks, Pitfalls, and What Skelar’s Type of Migration Teaches

No migration is free. The teams that come out the other side successfully are usually the ones that planned for the risks upfront. Here are the most common ones, drawn from public case studies and the patterns visible in Skelar-style multi-product engineering organizations.

Team learning curve. Most PHP developers have not written Go. The language is small and learnable, but the idioms are different. Plan for two to three months of ramp time before a team is fully productive. Pair programming and code review are essential during this window.

Error handling verbosity. Go’s explicit error handling is one of its strengths, but PHP developers used to exceptions will find it tedious. Expect pushback in the first month. It usually fades once teams see the production stability benefit.

Over-engineering with microservices. A common trap is using the migration as an excuse to break a PHP monolith into 30 Go microservices. Resist this. Move to a Go monolith first, or to a small number of well-defined services. Premature microservices create more pain than the PHP monolith ever did.

Losing the PHP ecosystem. Some PHP packages, particularly around payment integrations, CMS plugins, or specialized business logic, have no direct Go equivalent. Audit your dependencies before committing to migration timelines.

Testing during dual-running. Running PHP and Go side by side means your test suite needs to cover both, and your CI pipeline needs to deploy both. Budget for this. It is the most underestimated cost of migration.

Hiring. Go developers are in shorter supply than PHP developers in most markets, and they command higher salaries. In Tier 1 markets, expect a 15 to 30 percent salary premium for Senior Go engineers compared to equivalent PHP roles.

When You Should NOT Migrate from PHP to Go

This is the section most migration guides leave out, and it is the most important one. Not every PHP application should become a Go application. Here is when staying with PHP is the right call:

  • You run a content-driven site on WordPress or a similar CMS. The CMS plugin ecosystem and editorial workflows are deeply tied to PHP. Migration here usually destroys more value than it creates
  • Your application is I/O-bound on the database, not CPU-bound on the application. If your bottleneck is slow queries, fix the queries. Go will not help
  • Your team has zero Go experience and you cannot hire. A migration without internal expertise becomes a contractor-driven rewrite, which historically has terrible outcomes
  • Your traffic peaks at a few hundred requests per second. Modern PHP 8.3 with OPcache and a CDN handles that workload comfortably. Migration cost will exceed migration benefit
  • You are a small team with one or two products. The complexity overhead of running two stacks during migration may be more than you can absorb

The decision framework is straightforward. Migrate when concurrency, infrastructure cost, or specific performance requirements are blocking the business. Stay with PHP when those constraints do not apply, even if Go would technically be faster.

Frequently Asked Questions

Why are companies moving from PHP to Go in 2026?

The primary drivers are concurrency, deployment simplicity, and infrastructure cost. Go’s goroutine model handles thousands of simultaneous connections on hardware that would saturate PHP-FPM. Compiled binaries simplify Docker images and Kubernetes deployments. And the memory efficiency of Go reduces cloud spend significantly at scale.

How long does a PHP to Go migration take?

For a single service or hot endpoint, two to four weeks of engineering time is typical. For a full Laravel or Symfony application of moderate complexity, plan for six to twelve months of incremental migration. Big-bang rewrites that try to complete in less than six months almost always fail.

Is Go harder to learn than PHP?

Go has a smaller surface area than PHP. The language specification is intentionally minimal. The hard part is not syntax. It is learning to think in goroutines, channels, and explicit error handling. Most PHP developers reach baseline productivity in four to six weeks.

Can Go fully replace PHP for web development?

Yes, for backend APIs, microservices, and high-concurrency workloads. For traditional server-rendered websites and CMS-driven content sites, PHP remains the more productive choice. Many production systems run both, with Go handling APIs and PHP handling content.

How does Skelar approach backend modernization?

Skelar runs an incremental modernization model across its portfolio. New services are built in Go where concurrency and scale matter. Legacy PHP code is maintained until a specific business reason justifies migration. Shared infrastructure (Kubernetes, Redis, PostgreSQL, observability) lets both stacks coexist cleanly across multiple products.

What is the ROI of migrating from PHP to Go?

ROI shows up in three places: infrastructure cost (often 40 to 60 percent reduction at the service level), engineering velocity for new features (faster deploys, simpler ops), and the ability to build features that PHP cannot reasonably support (real-time, high-concurrency, low-latency).

Should I use a Go framework or just the standard library?

For most production work, a lightweight framework like Gin, Echo, or Fiber pays for itself in routing and middleware ergonomics. The Go standard library is excellent and you can absolutely build production services on net/http alone, but the boilerplate adds up.

What is the strangler fig pattern in PHP to Go migration?

The strangler fig pattern is a migration technique where new functionality is built in Go alongside the existing PHP application, with a gateway routing traffic between them. Over time, more routes move to Go until the PHP application can be safely retired. It is the standard playbook for migrating legacy systems without big-bang rewrites.

Conclusion and Next Steps

PHP to Go migration is not a trend. It is a structural response to what backend systems are being asked to do in 2026. The workloads that crushed PHP-FPM five years ago, real-time features, high-concurrency APIs, low-latency microservices, are now table stakes for any product company that wants to compete in Tier 1 markets.

For a venture builder like Skelar, the migration question is also a portfolio-level decision. Every product that moves backend services to Go reduces infrastructure cost, improves reliability, and frees up engineering capacity to build the kind of features that win users. That is why Go has quietly become a core part of the Skelar engineering stack alongside its longer-running PHP systems.

If you are evaluating a PHP to Go migration for your own engineering team, start small. Pick one painful endpoint. Build it in Go. Run it next to the PHP service for a month. Look at the numbers. If they justify the move, plan the next slice. If they do not, you have learned something valuable about your own architecture.

The teams that get this right do not start with a rewrite. They start with one service, one win, and a clear plan for the second one.

About Skelar: Skelar is a Kyiv-based venture builder that creates and scales international tech product companies across EdTech, SaaS, marketplaces, and consumer apps. The Skelar engineering organization supports a portfolio of more than a dozen businesses with shared infrastructure, modern technology stacks, and rapid scaling expertise. Learn more about open engineering roles at Skelar or explore the Skelar portfolio.

 

Book a Free Consultation Now!

We use strategic solutions and industry-leading technology to create websites that reflect your brand’s unique identity and grow your customer base and revenue.