Skip to content

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

Guide

Install PHP 8.4 on Windows (and keep other versions)

windows.php.net ships PHP 8.4 as a zip, not an installer, and gives you four builds to choose from. Picking the right one, installing the Visual C++ runtime it needs, writing a php.ini with the extensions most frameworks expect and putting it on PATH takes about fifteen minutes. These steps cover the manual route, how to keep older versions next to 8.4, and how EnvKit does the same from its PHP page.

Platform
Windows 10/11 (x64)
Time
About 15 minutes
You need
  • 64-bit Windows 10 or 11
  • Administrator permission once, for the Visual C++ runtime

PHP 8.4 Windows builds from windows.php.net; EnvKit details checked against 0.33.0-beta.56 on 2026-10-29.

  1. Step 1: Pick the right build

    On windows.php.net, take the x64 zip for PHP 8.4. Thread Safe (TS) is only for running PHP inside Apache as a module (php8apache2_4.dll), and then Apache must be a VS17 x64 build such as Apache Lounge’s. For everything else (the command line, Composer, nginx or IIS through FastCGI, Apache with mod_fcgid) take Non Thread Safe (NTS).

  2. Step 2: Install the Visual C++ runtime

    PHP 8.4 for Windows is built with Visual Studio 2022 (VS17) and needs the Microsoft Visual C++ 2015–2022 Redistributable (x64). Without it PHP stops with “VCRUNTIME140.dll was not found”. With an outdated copy it prints that VCRUNTIME140.dll is not compatible with this PHP build. Install the latest vc_redist.x64.exe from Microsoft in both cases.

  3. Step 3: Unzip PHP and create php.ini

    Extract the zip to a short path without spaces, such as C:\php84. Copy php.ini-development to php.ini in the same folder; the development defaults show errors on screen, which is what you want locally.

    In php.ini, set extension_dir to the full path of the ext folder (a relative path breaks when PHP runs from another folder) and remove the ; in front of the extensions you need. The list below covers Laravel, WordPress and Composer.

    C:\php84\php.ini
    extension_dir = "C:\php84\ext"
    extension=curl
    extension=fileinfo
    extension=gd
    extension=intl
    extension=mbstring
    extension=mysqli
    extension=openssl
    extension=pdo_mysql
    extension=pdo_sqlite
    extension=sqlite3
    extension=zip
    date.timezone = UTC
  4. Step 4: Add PHP to PATH and check it

    Add C:\php84 to your user Path (Start → “Edit environment variables for your account” → Path → Edit → New), then open a new terminal. php -v should print 8.4, php --ini should show C:\php84\php.ini, and php -m lists the loaded extensions.

    Command Prompt or PowerShell
    php -v
    php --ini
    php -m
  5. Step 5: Keep other versions next to it

    Unzip each version into its own folder (C:\php83, C:\php74) with its own php.ini. Only one of them can be plain php on PATH. For the others, put small launchers in a folder that is on PATH, one per version, so php83 artisan migrate runs PHP 8.3.

    For a web server, run one php-cgi.exe per version on its own port (for example C:\php83\php-cgi.exe -b 127.0.0.1:9083) and point each site’s FastCGI setting at the port of the version it needs.

    php83.bat
    @"C:\php83\php.exe" %*
  6. Step 6: Or install PHP 8.4 with EnvKit

    EnvKit is a free app that installs PHP versions, Composer, a web server and databases, and keeps each PHP version in its own folder.

    Or install from the terminal
    irm https://envkit.net/install.ps1?c=guide-install-php-8-4-windows | iex
  7. Step 7: What EnvKit sets up for you

    Open Services → PHP, pick the 8.4 build under Install & versions and click Install. EnvKit lists the official Windows builds from windows.php.net (NTS x64), one current release per line from 7.4 to 8.5. Before installing it checks the Visual C++ runtime and installs Microsoft’s redistributable if it is missing or too old, which asks for permission once.

    Each version gets its own php.ini, created from php.ini-development with extension_dir set, an error log you can read on the Logs page, 1024M upload, post and memory limits, and curl, exif, fileinfo, gd, intl, mbstring, mysqli, openssl, pdo_mysql, pdo_pgsql, pdo_sqlite, sqlite3 and zip turned on. Other extensions are on the version’s Extensions tab.

    Nothing goes on PATH until you tick it under Tools → Environment (PATH). With PHP version + ini launchers ticked, php is your default version and php84, php83 and so on call each installed version. Pinning a version to one site is covered in the multiple PHP versions guide.

If something goes wrong

“PHP Warning: Unable to load dynamic library”
The extension_dir is wrong or relative, or the extension’s DLL is not in ext. Use the full path, and check that the file (for example php_intl.dll) is there.
Apache will not load php8apache2_4.dll
The module needs the Thread Safe build and an Apache built with the same compiler (VS17, x64). Mixing an NTS zip or an older Apache build fails to load. Running PHP through FastCGI avoids the match entirely.
php -v still shows the old version
Another PHP folder comes earlier in PATH, often from XAMPP or Laragon in the system PATH. Run where.exe php, remove or reorder the older entry, and open a new terminal.