
Deploy Laravel on Vercel for Free — Even Heavy Filament Apps
How I bypassed Vercel's 250MB limit using a Go serverless proxy, compressed vendor, and a bundled PHP-FPM binary The Problem I wanted to deploy a Laravel + Filament app on Vercel's free Hobby plan. Two walls hit me immediately: 250MB size limit — Vercel serverless functions have a hard 250MB unzipped cap. My vendor/ directory alone was over 200MB with Filament, Dompdf, and other packages. HTTP 494 errors — Using SESSION_DRIVER=cookie (the only stateless option) caused "Request Header Too Large" because Filament stuffs too much data into the session cookie, exceeding Vercel's ~8KB header limit. vercel-php is a great project, but it couldn't solve the size problem for heavy apps. The Solution: A Go Proxy + Compressed Vendor I built vercel-laravel-go — a Go serverless function that wraps PHP-FPM and compresses vendor from ~200MB down to ~30MB. Here's what happens at a high level: HTTP Request → Vercel → Go Handler → FastCGI → PHP-FPM → Laravel The Go function handles the entire PHP lifecy
Continue reading on Dev.to
Opens in a new tab



