Skip to content
FrankenPHP
Esc
↑↓navigate↵open⌘Jpreview
Officially supported by The PHP Foundation

The modern PHP app server, written in Go.

One binary that boots your app once and keeps it alive. Worker mode, automatic HTTPS, HTTP/3 and Early Hints, stitched together on top of Caddy.

curl https://frankenphp.dev/install.sh | sh
Get started

Free and open source. Runs on Linux, macOS, Windows and FreeBSD.

  • Works natively with
  • Drupal
  • Sulu
  • WordPress
  • Laravel
  • Symfony
  • API Platform
  • Magento

One command to run them all.

A production-grade PHP server in one command. No PHP-FPM, no Nginx, no glue: copy your PHP files into the document root and you're done.

# Install FrankenPHP on Linux or macOS
curl https://frankenphp.dev/install.sh | sh

# Or on Windows, with PowerShell
irm https://frankenphp.dev/install.ps1 | iex

# Serve the public/ directory
frankenphp php-server -r public/

Boot it once.
It stays alive.

Worker mode boots your application a single time and keeps it in memory. Every request after that skips the bootstrap, using plain old superglobals: no PSR-7 required.

3.5×

faster than PHP-FPM on API Platform apps, according to our benchmarks.

The FrankenPHP mascot in a hard hat, driving an excavator

public/index.php

<?php
// Boot your app once
require __DIR__.'/vendor/autoload.php';
$app = new \App\Kernel();
$app->boot();

$handler = static function () use ($app) {
    echo $app->handle($_GET, $_POST, $_COOKIE, $_FILES, $_SERVER);
};

// …then serve request after request
while (\frankenphp_handle_request($handler)) {
    gc_collect_cycles();
}
  • Straightforward

    Supported natively by Laravel Octane, Symfony and API Platform.

  • Efficient

    Written in Go and C, built on Go's iconic goroutines.

  • Optional

    Apps that aren't worker-ready are served as-is, in classic mode.

  • Easy deploy

    Runs in process: one binary, no external service needed.

  • Watcher

    Workers restart automatically each time your code changes.

  • Self-healing

    Restart a worker after N requests to keep memory leaks in check.

Read the worker docs →

Caddyfile

localhost {
    # Enable compression (optional)
    encode zstd br gzip
    # Execute PHP files and serve assets
    php_server
}
That's the whole file.

Three lines. Production-grade.

That's all it takes to run a production-grade PHP server, powered by Caddy.

  • HTTPS ✓
  • HTTP/3 ✓
  • zstd · br · gzip ✓
  • Early Hints ✓
Read the config docs →

Everything else, in the box.

The FrankenPHP elephant and the Go gopher in a laboratory, lightning crackling between them
Go + C + PHP

Born in a lab. Written in Go.

FrankenPHP is a Caddy module and a library: embed the PHP interpreter in any Go program and serve PHP scripts through net/http.

server, _ := frankenphp.NewServer("public/")
frankenphp.Init(frankenphp.WithServer(server))
defer frankenphp.Shutdown()

http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
    server.ServeHTTP(w, r)
})
Use FrankenPHP as a Go library →

Moderner PHP than ever!

  • Runs the official PHP interpreter inside Caddy, a state-of-the-art web server.
  • Supports HTTP/1.1, HTTP/2 and HTTP/3 natively, with automatic HTTPS certificates.
  • Copy your PHP files into the document root, and you're done.
  • Builds standalone, self-executable binaries of your web apps and CLI tools.
  • Works out of the box with popular extensions, including OPcache and Xdebug.
Try it
The FrankenPHP mascot hugging a big red heart

Need a hand? We've got heart.

Les-Tilleuls.coop, the cooperative behind FrankenPHP, helps teams migrate, host and speed up their PHP apps.