Why FrankenPHP Is Revolutionizing PHP Performance and Deployment

FrankenPHP, created by Kévin Dunglas and backed by Les‑Tilleuls.coop and the PHP Foundation, embeds the PHP interpreter into Go and Caddy to simplify deployment, boost performance, lower hosting costs, support real‑time features, and offer a worker mode that dramatically speeds up Laravel, Symfony and Yii applications.

Open Source Tech Hub
Open Source Tech Hub
Open Source Tech Hub
Why FrankenPHP Is Revolutionizing PHP Performance and Deployment

Overview

FrankenPHP embeds the official PHP interpreter as a module for the Go language and the Caddy web server. By running PHP inside a single static binary (or Docker image) that also contains Caddy, deployment is reduced to a single executable, memory usage is lower, and request latency is significantly improved.

Key Technical Features

Native support for the Mercure protocol, enabling real‑time push capabilities without external services.

Extension points for Go, C and C++ code, allowing developers to write high‑performance native extensions that can be called from PHP.

Any Go program (e.g., custom server, proxy, CLI tool) can embed the PHP interpreter through the FrankenPHP library.

Worker Mode

Worker mode keeps reusable objects (such as Symfony or Laravel service containers) in memory across HTTP requests. This avoids the full bootstrap of the framework on each request, yielding an 80 % reduction in response time and a >6× reduction in required server instances, as measured by the Sylius e‑commerce platform.

Activation requires only configuration changes; Laravel, Symfony and Yii already provide official integrations that enable the mode without modifying application code. Typical activation steps are:

# Example: enable worker mode via environment variable
export FRANKENPHP_WORKER=1
# Run Caddy with the FrankenPHP binary
caddy run --config Caddyfile

Installation Options

Static binary : Download the pre‑compiled executable from the GitHub releases page (e.g., https://github.com/frankenphp/frankenphp/releases) and place it on the host system.

Docker image : Pull the official image ( docker pull ghcr.io/frankenphp/frankenphp:latest) and run it as a container that includes both Caddy and PHP.

Configuration with Caddy

In a Caddyfile, the PHP fastcgi directive points to the FrankenPHP binary, for example:

php_fastcgi / /usr/local/bin/frankenphp {
    worker
}

The worker subdirective enables worker mode. Additional Caddy features such as HTTP/3, Zstandard compression, automatic HTTPS, structured logging, and OpenMetrics/Prometheus metrics are available without extra configuration.

Project Status and Governance

The project has ~8 000 GitHub stars, >100 contributors, and is used by hosting providers including Upsun, Laravel Cloud, and Clever Cloud. The source code is being migrated to the official PHP GitHub organization, where the PHP Foundation will contribute to maintenance and compatibility with future PHP releases. Governance remains with the original maintainers (Kévin Dunglas, Robert Landers, Alexander Stecher), who continue to handle releases and code reviews.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

GoPHPCaddyWorker Mode
Open Source Tech Hub
Written by

Open Source Tech Hub

Sharing cutting-edge internet technologies and practical AI resources.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.