brew-php-switcher
« Back to VersTracker
Description:
Switch Apache / Valet / CLI configs between PHP versions
Type: Formula  |  Latest Version: 2.6@0  |  Tracked Since: Dec 17, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: php homebrew switcher development apache valet
Install: brew install brew-php-switcher
About:
brew-php-switcher is a command-line utility that automates the process of switching between multiple PHP versions installed via Homebrew. It streamlines the configuration of Apache, Nginx (Valet), and the CLI environment to ensure the correct PHP version is active. This tool eliminates the manual overhead of editing config files, saving developers significant time and reducing configuration errors.
Key Features:
  • Automates switching for Apache, Nginx, and CLI
  • Supports multiple Homebrew-installed PHP versions
  • Simple command-line interface
  • Automatic detection of installed PHP versions
Use Cases:
  • Developers managing multiple projects requiring different PHP versions
  • Testing applications across various PHP environments locally
  • Streamlining local development setup for LAMP/LEMP stacks
Alternatives:
  • valet use – Valet's built-in command only manages the environment for Valet sites, whereas brew-php-switcher also configures Apache and the global CLI.
  • Manual config editing – Manually editing httpd.conf and php-fpm.conf is error-prone and time-consuming compared to this automated script.
License: MIT
Bottles available for: all
Version History
Detected Version Rev Change Commit