🖤 Black Friday / Cyber Monday: 20% off Stratos Pro with code BFCM20 — Founder Lifetime $89 $71.20 once (ends Dec 7). Claim Deal →
BFCM20 · 20% Off⚡ New in v1.7.2: 1-Click MCP Server for Cursor & Claude Code — Lock in the $89 → $71.20 Founder Lifetime License with code BFCM20 (Save $207+/yr vs Herd Pro)Claim Founder Tier →
Stratosv1.7.2
Guides & Comparisons• 3 min read

How to Run Multiple PHP Versions Simultaneously on macOS

Run concurrent PHP 8.1, 8.2, 8.3, 8.4, and 8.5 FPM pools side-by-side on macOS without port conflicts, crashes, or 502 Bad Gateway errors.


The Challenge of Multi-Version PHP on macOS

Modern web development teams often maintain legacy client applications on PHP 8.1 or 8.2 while building new projects on PHP 8.3, 8.4, or testing early features on PHP 8.5. Historically, running multiple PHP versions locally required switching global Homebrew links (brew unlink php@8.2 && brew link php@8.3) or orchestrating complex Docker compose files.

Simultaneous PHP-FPM Pool Architecture in Stratos

Starting in version 1.7, Stratos provides native multi-version PHP pool orchestration. Rather than maintaining a single active PHP version, Stratos runs isolated PHP-FPM pools concurrently on dedicated Unix domain sockets:

  • ~/Library/Application Support/Stratos/fpm/php8.1.sock
  • ~/Library/Application Support/Stratos/fpm/php8.2.sock
  • ~/Library/Application Support/Stratos/fpm/php8.3.sock
  • ~/Library/Application Support/Stratos/fpm/php8.4.sock
  • ~/Library/Application Support/Stratos/fpm/php8.5.sock

Zero Port Conflicts & Resilient Startup

Because each pool communicates exclusively over a Unix domain socket, there are zero TCP port collisions. When you start or restart PHP-FPM, Stratos inspects your active projects and provisions every required PHP version pool automatically. If you have five sites each running a different PHP version, all five pools start together. Restarting one pool does not terminate the others, completely preventing 502 Bad Gateway errors.

Pinning PHP Versions Per Project

  1. Open the Stratos main window and navigate to Sites.
  2. Select your target site from the sidebar.
  3. In the PHP Version dropdown, pick any installed version (8.1 through 8.5).
  4. Stratos updates the site's Nginx upstream socket configuration and reloads Nginx dynamically in under 200 milliseconds.
🖤 BFCM20 · 20% OFF THROUGH DEC 7, 2026

Replace $296+/yr of macOS Dev Subscriptions with Stratos

Start free forever with native Nginx, PHP 8.1–8.5, .test HTTPS, Xdebug 3, and read-only MCP schema tools—or lock in the Founder Lifetime license (3 Macs) for $71.20 (reg. $89) with code BFCM20.