Upgrading PHP in XAMPP for Windows?
Take a backup of your htdocs and data folder (subfolder of MySQL folder), reinstall upgraded version and replace those folders.
Note: In case you have changed config files like PHP (php.ini), Apache (httpd.conf) or any other, please take back up of those files as well and replace them with newly installed version.
Simplest method to upgrade PHP
in XAMPP
:
- Download latest portable version of
XAMPP
. - Extract the archive(not where
XAMPP
already installed). - Copy the
PHP
folder from the extracted archive. - Keep back up of
PHP
folder which is in installedXAMPP
directory. You can backup it like changing thePHP
folder name toPHP-old
or likePHP-version-number
- Paste the
PHP
folder which you copied from the extracted archive. - Replace the
php.ini
file with your backup folderphp.ini
file in case you have changed the default settings earlier. - That's all, start/restart the
server
.