I want to downgrade php version from 7.1.1 to 5.6 in xampp 7.1.1. But I can't find any option.

- 422
- 1
- 5
- 10
-
I think, that this link explains it very well http://stackoverflow.com/questions/25397219/how-to-downgrade-php-from-5-5-to-5-3 however, you can delete your current instalation and make new one. – janfitz Mar 29 '17 at 07:06
-
It is possible to do what you ask. You can download PHP, and just change your config file to the folder you need. As seen in another SO post [here](https://stackoverflow.com/questions/45790160/is-there-way-to-use-two-php-versions-in-xampp). – Keviin Feb 18 '18 at 13:08
-
2If you want more than one php version with customization use WAMP. – Jaffar Mar 11 '19 at 06:20
13 Answers
I think the most safest downgrade path from PHP7 to PHP5 in Xampp is:
Download a self-packaged version of Xampp with PHP5 from here (as of today this is
xampp-win32-5.6.37-0-VC11.zip
).Rename the
php
folder tophp7
in Xampp.Now copy the
php
folder fromxampp-win32-5.6.37-0-VC11.zip
into your Xampp install folder.Make a backup from
.\xampp\apache\conf\extra\httpd-xampp.conf
file.Replace this file from
xampp-win32-5.6.37-0-VC11.zip
as well.This way the config files (including
php.ini
) has settings from the Xampp team.
Before any changes, to verify changed Apache configs, you can compare both Xampp release folder at
.\xampp\apache\conf
with tools like Meld.I should note that please download PHP 5 and 7 Xampp packages released at the same time.
Notify me if I miss something.

- 2,299
- 2
- 36
- 69
-
2I'm glas you mentioned taking a backup, because when I follow these steps, my xampp won't start anymore (without throwing an error) – Wouter Vanherck Sep 03 '18 at 11:21
-
-
Ah, no, I wrote that out wrong. XAMPP is starting, but Apache isn't. My bad – Wouter Vanherck Sep 03 '18 at 15:56
-
What I did was downloaded the up-to-date Xampp versions both for PHP7 and PHP5. So they are released probably at the same time. – Lanti Sep 03 '18 at 16:39
-
There's something else in the apache folder that doesn't allow the apache to start. Replacing the entire apache folder (MAKE A BACKUP) like Mas's answer says worked like a charm. – Kerwin Sneijders Apr 22 '21 at 09:21
-
With these particular instructions, I successfully downgraded PHP from 8.0.9 to 5.6.40. – Packwood Aug 20 '21 at 15:44
If you want to downgrade php from 7.1.1 to 5.6 in xampp follow the steps(For Windows):-
- Go to https://sourceforge.net/projects/xampp/files/XAMPP%20Windows/5.6.36/
- Download and extract the file xampp-win32-5.6.36-0-VC11.zip see the image [image 1][1]
Delete php folder and apache folder present in C:\xampp
Copy php folder and apache folder from extracted file and paste it to C:\xampp
Add " C: " before \xampp\ to php ini file present in php folder.
Start your apache and MySQL and check php version. It will show php 5.6.36

- 101
- 1
- 11

- 189
- 1
- 4
-
2
-
Thanks. This actually worked. I wasted alot of time in this when this was soo small – Vritika Malhotra Mar 19 '21 at 10:31
Just delete this xampp, and download 5.6 version.

- 12,410
- 3
- 41
- 67

- 292
- 3
- 17
-
4Actually I want to use xampp latest version but for project purpose I need php version 5.6. Is it possible to downgrade the php version without uninstalling xampp? – Shiblee Sadik Mar 29 '17 at 07:23
-
There is no option to downgrade XAMPP. XAMPP is hardcoded with specific PHP version to make sure all the modules are compatible and working properly. However if your project needs PHP 5.6, you can just install a older version of XAMPP with PHP 5.6 packaged into it.

- 1
- 1
-
Actually I want to use xampp latest version but for project purpose I need php version 5.6. Is it possible to downgrade the php version without uninstalling xampp? – Shiblee Sadik Mar 29 '17 at 07:23
-
Simple answer no. You can either run php 5.6 or 7.1.1 It is not possible to run both at the same time but you can install them in same machine. However, the processing will be done by either 5.6 or 7.1.1 – Mar 29 '17 at 07:28
Change the .htaccess code to switch to PHP 5.6:
AddHandler application/x-httpd-php56 .php

- 186
- 9
XAMPP is an integrated package and you can not downgrade or change one of its component such as php. (There are some solutions that you can use but there is little chances that everything work fine.)
You can download the package from these links:
You had better to download the old package form sourceforge.net.
You do not have to install another version of Xampp. I've managed to use PHP 5.6 on my Xampp PHP 7 version. Here is what you need to do to make it works:
- Raname (backup)
<XAMPP_DIR>\php
to<XAMPP_DIR>\php~7
- Copy (backup)
<XAMPP_DIR>\apache\conf\extra\httpd-xampp.conf
to<XAMPP_DIR>\apache\conf\extra\httpd-xampp~7.conf
- Download PHP5 and unpack it to
<XAMPP_DIR>\php
- Edit
<XAMPP_DIR>\apache\conf\extra\httpd-xampp.conf
and change allphp5
occurrences tophp7
. You need to changephp7apache2_4.dll
tophp5apache2_4.dll
,php7ts.dll
tophp5ts.dll
andphp7_module
tophp5_module
- Ensure all your paths are correct like
extension_dir
inphp.ini
.
Restart Apache and voila.

- 662
- 1
- 11
- 22
-
Can you please give us a link to download or tell us where you got your PHP5? – Anil Prz Jun 22 '18 at 04:20
If you want to downgrade php version, just simply edit yout .htaccess file. Like you want to downgrade any php version to 5.6, just add this into .htaccess file
<FilesMatch "\.(php4|php5|php7|php3|php2|php|phtml)$">
etHandler application/x-lsphp56
</FilesMatch>

- 9
- 1
I know it might be late but I'm just adding to Lanti's answer since it's the most popular, I had the same problem as Wouter Vanherck in the comments and I can't comment yet.
What helped for me was instead of just replacing \xampp\apache\conf\extra\httpd-xampp.conf
I replaced the whole apache
folder. I basically did the same thing with it as with the php
folder (steps 2 and 3).
Now the error is fixed and Apache starts just fine.

- 17
- 1
- 4
Using WAMP is perforce option if we want to use more then one version of php.

- 618
- 3
- 8
- 29
It is very easy to do, all you need to do is 1) download 5.6 from [1]: https://sourceforge.net/projects/xampp/files/XAMPP%20Windows/5.6.36/, the run the setup and install in folder "xampp"
2) download 7.6 from [https://sourceforge.net/projects/xampp/files/XAMPP%20Windows/7.4.2/xampp-portable-windows-x64-7.4.2-0-VC15-installer.exe/download][1] and run the setup in "xampp2"
NOte: after that you now have separate xampp installed in your system. all you do now is to run each xampp as a separate entity. Alway quite the 5.6 if you want to run 7.6

- 85
- 6
This solution is Only for local system / localhost on windows:
The simplest way to install xampp 5.6.X version as per your requirement in other windows drive then run xampp 5.6.X services from it's control panel for php 5.6 version.
NOTE: If you already have xampp (any other version) on your system then please close that xampp's services then start xampp 5.6.x services otherwise this solution will not work.
You can download your required (xampp 5.6 as per question) xampp version from below link:
https://sourceforge.net/projects/xampp/files/XAMPP%20Windows/
I have used this solution many times, it worked like charm. I hope this will also help you. Thank you to ask this question.

- 5,233
- 39
- 50
i was trying the same, so i downloaded the .7zip version of XAMPP with php 5.6.33 from https://sourceforge.net/projects/xampp/files/XAMPP%20Windows/5.6.33/
then followed the steps below: 1. rename c:\xampp\php to c:\xampp\php7 2. raname C:\xampp\apache\conf\extra\httpd-xampp.conf to httpd-xampp7.OLD 3. copy php folder from XAMPP_5.6 7zip archive to c:\xampp\ 4. copy file httpd-xampp.conf from XAMPP_5.6 7zip archive to C:\xampp\apache\conf\extra\
open xampp control panel and start Apache and then visit ( i am using port 82 instead of default 80) http://localhost and then click PHPInfo to see if it is working as expected.

- 21
- 1