Step 1: install XAMPP 7.4.1, make it work :) At this point you have C:/yourdir/xampp and in particular C:/yourdir/xampp/php and C:/yourdir/xampp/apache/conf/extra
Step 2 : download XAMPP 8.0.1, as a zip archive, not a self executable install Don't install it. Instead,
- extract the content of the xampp/php directory and put it in C:/yourdir/xampp/php8
- extract the file xampp/apache/conf/extra/httpd-xampp.conf and copy it to C:/yourdir/xampp/php and C:/yourdir/xampp/apache/conf/extra/httpd-xampp8.conf
Step 3 : edit C:/yourdir/xampp/php8/php.ini and modify the paths (eg replace all default \xampp with \yourdir\xampp). If applicable edit this C:/yourdir/xampp/php8/php.ini to match your functional C:/yourdir/xampp/php/php.ini other settings.
Step 4 : edit C:/yourdir/xampp/apache/conf/extra/httpd-xampp8.conf and modify the default paths again (Do not simply copy all conf from the existing httpd-xampp.conf file, as some directives change names)
Step 5 : job done, now you have 2 functional installs.
To switch :
- Run xampp-control.exe and start Apache : you're running PHP 7.4.1 as previously.
- Stop Apache
- Switch the two PHP directories : ---- Rename C:/yourdir/xampp/php to C:/yourdir/xampp/php7 ---- Rename C:/yourdir/xampp/php8 to C:/yourdir/xampp/php
- Switch the two Apache config files : ---- Rename C:/yourdir/xampp/apache/conf/extra/httpd-xampp.conf to C:/yourdir/xampp/apache/conf/extra/httpd-xampp7.conf ---- Rename C:/yourdir/xampp/apache/conf/extra/httpd-xampp8.conf to C:/yourdir/xampp/apache/conf/extra/httpd-xampp.conf
- Start Apache : you're running 8.0.1
Source: https://community.apachefriends.org/f/viewtopic.php?f=16&t=80366