Keeping your development environment up to date is essential for the security and performance of your system. XAMPP is one of the most used development environments.
In this article, we are going to share how you can update the PHP version on your XAMPP server for Windows.
What is XAMPP?
XAMPP is an open source and cross platform local web server solution which helps you get started with web development out of the box using the PHP language. XAMPP stands for cross-platform, Apache, MySQL, PHP and Perl.
Below are steps to update XAMPP PHP version
- First visit https://windows.php.net/download and download the latest version of PHP or the version that you wish to update to.
- Go to your XAMPP installation folder and rename the old php folder with its version number. For example, if the current version is 5.3 then rename the folder to php_5_3.
Now create a new folder named php in the XAMPP installation folder and extract the new php version that we downloaded earlier in this folder.
- Open the XAMPP control panel and click on the configure button next to the Apache Module. Select the Apache(httpd-xampp.conf) option.
- In the PHP-Module setup section replace the older php version number with the new one in the LoadFile and LoadModule line.
- Finally restart the XAMPP server and the new PHP version should be live now.
New versions of PHP are released from time to time. It is very important that one stays up to date with them to take advantage of the new feature additions and keep themselves safe from security bugs in the previous versions. You should be able to update your XAMPP server with the latest PHP version with the help of this tutorial easily.