It provides all the steps required to update and upgrade the most recent release of PHP in XAMPP on Windows 10.

How To Update PHP Version In XAMPP On Windows
How To Update PHP Version In XAMPP On Windows
December 01, 2019

XAMPP is a complete package to install the Apache Web Server, MySQL, PHP, Perl, FTP Server and phpMyAdmin for Linux, Solaris, Windows, and Mac OS X. It also provides an interface to admin Apache Web Server, MySQL, and PHP. Though XAMPP is being released frequently, it might be required to use the most recent version of PHP till XAMPP include it in its distribution. This tutorial provides all the steps required to update or upgrade the PHP version in XAMPP.

You can also follow the tutorials How To Install XAMPP On Windows and How To Install PHP 7 On Windows to install the most recent version of XAMPP and PHP on Windows.

Step 1 - Open XAMPP Control Panel

Open the XAMPP Control Panel as shown in Fig 1.

XAMPP Control Panel

Fig 1

Step 2 -Open Apache Config Panel

Click on the Config Button next to apache. It will show the configuration options as shown in Fig 2.

XAMPP Apache Config

Fig 2

Step 3 - Open Config File

Choose the option Apache(httpd-xampp.conf) as highlighted in Fig 2. It will open the configuration file httpd-xampp.conf as shown in Fig 3.

XAMPP PHP Config

Fig 3

Step 4 - Update PHP Installation Path

I have highlighted some of the PHP configurations in Fig 3. I have installed the most recent version of PHP i.e. PHP 7.4.0 while writing this tutorial by following How To Install PHP 7 On Windows. Also, I have updated the PHP installation path as highlighted in Fig 4.

XAMPP PHP Config New

Fig 4

Step 5 - Save Configuration and Start Apache

Now save the changes and start the Apache Web Server. It will show the Apache status as shown in Fig 5.

XAMPP Apache Status

Fig 5

Step 6 - Verify PHP

In this step, we will verify the PHP version used by XAMPP. Open the Browser and type the URL http://localhost. It will show the XAMPP Dashboard. Now click on the PHPInfo Link to open the PHP info page as shown in Fig 6.

XAMPP PHP 7.4

Fig 6

It reflects the most recent version of PHP i.e. PHP 7.4 as highlighted in Fig 6.

Summary

In this tutorial, we have discussed to use multiple versions of PHP using XAMPP by configuring the apache configuration file. I have provided all the steps required to upgrade the PHP distributed by XAMPP to the most recent version of PHP i.e. PHP 7.4.

Write a Comment

Click on the captcha image to get new code.
Discussion Forum by DISQUS