How to change PHP version in XAMPP?

11,916

Solution 1

You can also do it in another way.

Download your desired version of php here and then go to XAMPP folder (most likely C:\xampp).

There, extract the downloaded php file and name it php (paste it in C:\xampp) Then, copy all files from your old php folder and paste it in the new php folder.

Do not replace any files, just copy missing files and if your php version is less than 7, don't forget to edit your httpd-xampp.conf file.

Restart your Apache server and, hopefully, it will work.

Solution 2

Change you Xampserver you can't change php version inside xampserver

you can download from below link 

Download xampserver

Share:
11,916
K. Vante
Author by

K. Vante

Updated on June 25, 2022

Comments

  • K. Vante
    K. Vante almost 2 years

    I've downloaded XAMPP ver. 7.2.10 which supposedly has the PHP ver. 7.2.10.

    But when I run a composer update on cmd, it says that my PHP version is 7.0.21. I need to have a PHP 7.1.3 in order to run my frameworks.

    Is there a way to change the PHP version without installing a new XAMPP? Because I already have the latest version installed and the PHP versions stated in the XAMPP and CMD are different.