Until this article was written, Apache Friends only ships XAMPP with PHP 8.2 and there is no XAMPP version with PHP 8.4. If you want to upgrade PHP from your XAMPP to the latest version (PHP 8.4), the steps are actually quite straightforward.

Migrating your local PHP environment to the latest 8.4 release allows you to take advantage of new language features, performance improvements, and security patches without reinstalling XAMPP.

So let's start the upgrade process.

Backup the Existing PHP Environment

Before making any changes, ensure you can restore your setup if needed:

  1. Locate your XAMPP installation directory, commonly C:\xampp.

  2. Compress the php folder into a ZIP archive (e.g., php_backup.zip).

  3. Save a copy of your custom php.ini if you've made modifications.

So when there is a problem, we just need to delete or rename the php folder and extract the zip file that we created earlier to restore PHP to its original state.

Download PHP 8.4 Thread Safe ZIP Package

Now we have to download PHP 8.4 from its official website. I am using Windows so I will download the version for Windows OS.

  1. Visit the official PHP for Windows download page: https://windows.php.net/download/

  2. Select the latest PHP 8.4.x version.

  3. Choose the "Thread Safe" ZIP package that matches your system architecture (x86 or x64).

  4. Download and save the package to your preferred directory.

Replace the PHP Files in XAMPP

Before replacing it, stop Apache via the XAMPP Control Panel.

  1. Extract the contents of the PHP 8.4 ZIP file.

  2. Overwrite the existing C:\xampp\php folder with the extracted files.

  3. Ensure files replace the old PHP files directly; do not nest them inside an additional folder.

  4. If you had a custom php.ini, copy relevant settings to the new php.ini in C:\xampp\php.

  5. Alternatively, rename php.ini-development to php.ini if you prefer a default configuration and then tweak it as needed.

Verify the Upgrade

Now we check whether everything works as it should or not.

  1. Restart Apache from the XAMPP Control Panel.

  2. Check if Apache starts without errors.

  3. Open a PHP info page or run php -v in the command prompt to confirm the PHP version displays as 8.4.

  4. If Apache fails to start, review error logs for missing DLLs or path issues.

  5. Ensure your php.ini is properly configured for your environment.

If you don't find any errors, then congratulations! You have upgraded the PHP version in XAMPP to the latest PHP version.


Upgrading XAMPP's PHP runtime lets you experiment with the latest syntax improvements and ensures you're building on a supported, secure foundation. Happy coding!