Skip to content

Public beta — free forever, no account required Download now →

Guide

Multiple PHP versions on Windows

Keeping a PHP 7.4 client project alive next to a new PHP 8.5 app is where most Windows setups break: one PHP on PATH, one php.ini, one FastCGI process. EnvKit installs every version in its own folder and runs a separate PHP process per version in use, so each site gets the PHP it asks for.

Platform
Windows 10/11 (x64)
Time
About 10 minutes
You need
  • 64-bit Windows 10 or 11
  • EnvKit with a web server installed (the first-run screen does this)

Written against the EnvKit 0.33.0-beta.25 interface and PHP catalog, checked 2026-09-18.

  1. Step 1: Install EnvKit

    Download the installer, or paste the command below into PowerShell. It fetches the latest release from GitHub and runs the installer; Windows asks for permission once.

    Or install from the terminal
    irm https://envkit.net/install.ps1?c=guide-multiple-php-versions-windows | iex
  2. Step 2: Install the PHP versions you need

    Open Services → PHP. Under Install & versions, pick a version and click Install, then repeat for each version. The Windows catalog has one current build per line: 7.4.33, 8.0.30, 8.1.34, 8.2.31, 8.3.31, 8.4.22 and 8.5.7 (NTS x64).

    Each version lives in its own folder with its own php.ini and extensions, so enabling an extension for one version never touches another.

  3. Step 3: Choose the default version

    The default version serves every site that is not pinned, and it is the plain php in your terminal. Click Switch to 8.4.22 (or any installed version) on the PHP page, or use Use PHP 8.4.22 from the tray menu.

  4. Step 4: Pin a version to a site

    Open the site from Sites. In the Runtime card on Overview, pick a version under PHP version (isolate this site). Default (global PHP) follows the default version.

    A non-default version runs its own FastCGI process on its own port, so a PHP 7.4 app and a PHP 8.5 app serve at the same time. The PHP page lists every version with the number of sites using it.

  5. Step 5: Use any version from the terminal

    Every installed version gets its own command: php74, php80, php81php85, each loading that version’s own php.ini. Plain php is the default version. Inside a site’s folder, envkit php, envkit composer and envkit artisan use the PHP pinned to that site.

    PowerShell
    php -v                  # the default version
    php74 -v                # PHP 7.4
    php83 artisan migrate   # run a command on PHP 8.3
    envkit artisan migrate  # the PHP pinned to this site

If something goes wrong

Composer runs on the wrong PHP
composer uses the default version. In a site folder, run envkit composer install to use the site’s pinned PHP instead.
An extension works on one version only
That is expected: extensions are per version. Open Services → PHP, select the version, and enable it on its Extensions tab.
FrankenPHP ignores the site’s PHP version
FrankenPHP ships its own PHP 8.5. While it is the active web server, per-site versions do not apply. Switch back to nginx, Apache or Caddy in Settings → Web server.