Install PHP 8.6 on Windows and macOS, with Xdebug, Redis and 27 more extensions
PHP 8.6.0 came out on 2026-11-19. php.net publishes the PHP 8.6 zips for Windows, but its PECL page has a Windows build of only one extension for 8.6 (mongodb): no Xdebug, Redis, APCu, Imagick or sqlsrv DLLs yet, and the 8.5 DLLs do not load in 8.6. The new EnvKit installs PHP 8.6 with 29 of those extensions built for it, on Windows and macOS, next to the PHP versions you already use.
- Platform
- Windows 10/11 (x64), macOS on Apple silicon
- Time
- About 5 minutes
- You need
- 64-bit Windows 10 or 11, or a Mac with Apple silicon
- On Windows: the Microsoft Visual C++ Redistributable 14.50 or newer (x64)
PHP 8.6.0 (windows.php.net, VS18 x64 builds); EnvKit details checked against the new EnvKit 0.34.0-beta.12 on 2026-11-22.
Step 1: Why the usual way stops at the extensions
PHP 8.6 for Windows is built with Visual Studio 2026 (VS18, MSVC 14.50) and its Zend API is 20261112. A PECL DLL has to be built for exactly that: the PHP 8.5 builds of
php_xdebug.dllorphp_redis.dllstop with “Unable to load dynamic library” or a Zend API mismatch. php.net builds PECL DLLs for Windows some time after a release; until then there is nothing to download for most extensions.Several extensions also needed source changes for 8.6, because 8.6 removed old aliases and changed internal APIs (session
save_path,php_verror(),unserialize_callback_func). Xdebug needs its 3.6 line: 3.5 refuses to load into 8.6.Step 2: Install the Visual C++ runtime (Windows)
PHP 8.6 needs the Visual C++ runtime 14.50 or newer, the one Visual Studio 2026 ships. An older 2015–2022 runtime is not enough: PHP then fails to start (
0xc0000135, or a message thatVCRUNTIME140.dllis not compatible). Install the latestvc_redist.x64.exefrom Microsoft. EnvKit tells you when the runtime is too old and never makes a PHP the default if it cannot start on the PC.Step 3: Get the new EnvKit
PHP 8.6 is in EnvKit 1.0, a free app that installs PHP versions, Composer, web servers and databases. Download it for your system below. If you use the classic EnvKit, click “Move to the new EnvKit” in the app instead: it keeps your sites, databases and settings.
Step 4: Install PHP 8.6
Open Services → PHP → Versions, pick 8.6.0 and click Install. On Windows EnvKit installs the official NTS x64 build from windows.php.net; on macOS its own build with the same compiled-in extensions as its PHP 8.5. PHP 8.5 stays your default, so nothing you run changes until you choose: make 8.6 the default for everything, or pin it to one site.
Each version keeps its own
php.iniand its own extensions, so 8.5 and 8.6 run side by side, each on its own FastCGI port.Step 5: Turn on the extensions you need
Open Services → PHP → Settings, pick 8.6 in the version picker and switch on what your project uses on its Extensions tab. On Windows these 29 come from EnvKit’s own builds for PHP 8.6 (VS18, x64, checksum-verified):
redis,xdebug,apcu,memcached,memcache,imagick,imap,oci8,pdo_oci,sqlsrv,pdo_sqlsrv,igbinary,msgpack,amqp,rdkafka,grpc,protobuf,yaml,zstd,ssh2,ds,event,ev,pcov,mailparse,oauth,yac,xlswriterandopentelemetry.mongodbcomes from php.net. On macOS they are part of EnvKit’s PHP 8.6 build.Each extension’s own test suite was run on 8.6 against the same tests on 8.5 with php.net’s builds; the only differences are changes PHP 8.6 itself made. Xdebug step debugging, coverage and profiling were checked with a real debugger session.
With 8.6 as the default PHP, in a new terminal php -v php -m
If something goes wrong
- “Unable to load dynamic library php_xdebug.dll” on PHP 8.6
- The DLL was built for PHP 8.5 or older. A PECL DLL must match PHP 8.6 exactly (VS18, x64, NTS or TS as your PHP, Zend API 20261112). Use an 8.6 build of the extension; for Xdebug that means the 3.6 line.
- PHP 8.6 does not start: 0xc0000135 or VCRUNTIME140.dll not compatible
- The Visual C++ runtime is older than 14.50. Install the latest x64 redistributable from Microsoft, then start PHP again. EnvKit shows the same reason and the download link instead of making 8.6 the default.
- Sessions stored in Redis start over on PHP 8.6
- PHP 8.6 turns
session.use_strict_modeon by default, so a session id the server did not create is replaced. That is the same for the files handler. Setsession.use_strict_mode = 0in that version’s php.ini only if your app relies on choosing its own ids.