Code The Pixel

Upgrade PHP and Apache in Laragon 6: A Step-by-Step Tutorial

Asyraf Wahi Anuar - June 26, 2025
Published in Tools & Software 3773 Views Email This Article
Estimated reading time: 2 minutes, 52 seconds

Upgrading PHP and Apache in Laragon can enhance your development environment significantly, providing access to the latest features and improvements. This step-by-step tutorial will guide you through the process, ensuring a smooth transition while preserving your existing projects. Whether you're looking to leverage new PHP functionalities or optimise Apache settings, we've got you covered. Let’s dive in and make the most of Laragon by upgrading to the latest versions!

Upgrade PHP Version

1. Download the PHP Version You Want
- Visit the official PHP for Windows download page.
- Choose the version you want (e.g., PHP 8.3 or 8.4).
- Select the Thread Safe version for compatibility with Apache.
- Make sure to match your system architecture (x64 or x86).

2. Extract PHP into Laragon
- Unzip the downloaded PHP package.
- Rename the folder to something like php-8.4.4-Win32-vs16-x64.
- Move it to:

C:\laragon\bin\php\


3. Switch PHP Version in Laragon
- Right-click the Laragon icon in the system tray.
- Go to PHP > Version > [your new version].
- Laragon will automatically switch to the selected version.

4. (Optional) Set PHP Path in Environment Variables
If you want to use the new PHP version in the terminal globally:
- Open System Properties > Environment Variables.
- Under System variables, find Path and click Edit.
- Add the path to your new PHP folder, e.g.,

C:\laragon\bin\php\php-8.4.4-Win32-vs16-x64\

- Move it to the top of the list to give it priority.

5. Restart Laragon
- Exit and reopen Laragon to apply changes.
- Open the terminal and run php -v to confirm the new version is active

Upgrade Apache Version

Updating Apache can resolve compatibility issues, especially when switching to newer PHP versions like 8.3 or 8.4. Here's a step-by-step guide to update Apache in Laragon 6 (free version):

1. Download the Latest Apache Build
- Go to Apache Lounge.
- Download the latest Win64 VS17 version (e.g., httpd-2.4.63-win64-VS17.zip).
- Make sure it matches your system architecture and Visual Studio runtime (VS17 is compatible with Laragon 6).

2. Extract and Prepare the Folder
- Unzip the archive. You’ll get a folder like httpd-2.4.63-win64-VS17.
- Inside that folder, go to Apache24\ and move all contents up one level (so bin, conf, etc. are directly inside httpd-2.4.63-win64-VS17).
- Delete the now-empty Apache24 folder.

3. Move to Laragon’s Apache Directory
- Move the cleaned-up folder to:

C:\laragon\bin\apache\

- You should now have something like:

C:\laragon\bin\apache\httpd-2.4.63-win64-VS17\


4. Switch Apache Version in Laragon
- Right-click the Laragon icon in the system tray.
- Go to Apache > Version > [your new version].
- Laragon will restart Apache with the new version.

5. (Optional) Fix mod_fcgid for PHP Compatibility
If you're using PHP 8.3+ and get errors:
- Download mod_fcgid for VS17 from Apache Lounge.
- Place mod_fcgid-2.3.10-Win64-vs17.so in:

C:\laragon\etc\apache2\modules\

- Edit fcgid.conf in C:\laragon\etc\apache2\ and update the LoadModule path:

LoadModule fcgid_module "C:/laragon/etc/apache2/modules/mod_fcgid-2.3.10-Win64-vs17.so"


6. Restart Laragon
- Fully exit and relaunch Laragon.
- Run httpd -v in the terminal to confirm the new Apache version.

Upgrading PHP and Apache in Laragon can greatly enhance your development experience by providing the latest features and improved performance. By following the outlined steps, you can successfully transition to newer versions while ensuring that your existing projects remain intact. Embrace these updates to optimise your development environment.


Cite this article (APA 6th Edition)