Been using XAMPP Portable on my Windows machine for some years now. Always a pain to upgrade the PHP version. Noting down the steps for future reference.
- Run
phpinfo()
and check Architecture (x86, x64) and Thread Safety (enabled, disabled). - Go to https://windows.php.net/download and download the correct zip file for the new PHP version. You may also need to download and install the Visual Studio Redistributable, also available on the same page on the sidebar.
- Copy the page source of
phpinfo()
and paste in https://xdebug.org/wizard.php to analyze and get the correct Xdebug DLL for the new PHP version. Take note of the instructions returned with the analysis. - Assuming XAMPP is currently installed in
C:\xampp
:- Backup
C:\xampp\php
toC:\xampp\php-backup
. - Unzip the zip file from php.net and copy the contents to
C:\xampp\php
, overwriting existing files. - Backup
C:\xampp\apache\bin
toC:\xampp\apache\bin-backup
. - Copy
libeay32.dll
,libssh2.dll
,nghttp2.dll
andssleay32.dll
fromC:\xampp\php
toC:\xampp\apache
andC:\xampp\apache\bin
. - Copy the Xdebug DLL to
C:\xampp\php\ext
and updateC:\xampp\php\php.ini
as per the instructions returned with the analysis on the Xdebug wizard page.
- Backup
- Restart Apache. You may need to restart Windows so that previous Apache processes are properly terminated.