DevStackBoxDevStackBox

Run multiple PHP versions side by side on Windows

Serve one local site with PHP 8.3 and another with PHP 8.5, then check the runtime used by each website and your Windows terminal.

On this page

Pin an installed PHP branch to each project in Projects → Manage project → PHP & tools. Apache can then serve both sites at the same time. The Windows PHP command follows the global default.

Watch the captioned demo or download DevStackBox for Windows.

Set up two local sites

  1. Install DevStackBox for Windows. Open Services → PHP → Versions. This example uses the bundled 8.3 branch and an installed 8.5 branch. Choose Download beside 8.5 if needed. Leave your usual global default selected.
  2. Create two empty folders named catalog and studio somewhere you can write. In each folder save the following as version.php. The page only prints the runtime version.
<?php
header('Content-Type: text/plain');
echo PHP_VERSION;
  1. In Projects → Add project / site, connect the catalog folder using catalog.test. Use the folder itself as the document root. Repeat for the studio folder using studio.test. Both names must be unused. Allow the Windows hosts update if prompted.
  2. Open Manage project → PHP & tools for catalog, choose 8.3, and apply. Choose 8.5 for studio and apply. Start Apache and follow any restart prompt after saving.

Project settings with folder, document root and PHP version fields

Set the folder Apache serves and the PHP version this site uses.

Open original image
Project settings with folder, document root and PHP version fields
Set the folder Apache serves and the PHP version this site uses.

Check the runtime serving each request

Open http://catalog.test/version.php and http://studio.test/version.php in separate tabs. Use your configured port if Apache listens on a port other than 80. In a fresh Windows terminal run:

where.exe php
php -v
RequestResult from the example
catalog.test/version.php8.3.36
studio.test/version.php8.5.12
php -v8.4.27 (cli)

These results were measured on 19 November 2026 using the installed v0.1.22 Apache and PHP binaries in an isolated local host configuration. Your patch numbers and CLI default may differ.

If both sites show the same version, check the hostname, each site's saved selection, and whether Apache loaded the change. For an unexpected CLI version, the first result from where.exe php shows which launcher Windows found. See PHP runtimes and extensions.

Return a site to the default

Choose Use global default for that project, apply it, then reload both URLs. The other site should still use its pinned branch. Remove the demonstration files when finished. Release v0.1.22