How to update PHP version in XAMPP. Many web developers, especially beginners, have a common question: “How do I update my PHP version in XAMPP?” After receiving many questions about updating the PHP version, we decided to write a short and simple tutorial so that you can easily update the PHP version in XAMPP (Windows).
In this tutorial we will show you how you can easily update your PHP version in XAMPP through 4 steps.
XAMPP plays an important role for web developers. It is one of the most popular stacks that developers use to build websites on their own system for free. Working in localhost is a good practice to strengthen your web development skills. It is also common among WordPress developers.
Updating the PHP version in XAMPP is very simple. All you have to do is follow these 4 simple steps.
Step 1: Download the latest PHP version
First, download the latest version of PHP via the link below:
Make sure you download the Thread Safe Zip file depending on your version of Windows. x86 for 32-bit and x64 for 64-bit. As you can see in the image below:
In the picture above you can see that I have downloaded VC15 x64 Thread Safe because my version of Windows is 64-bit.
Step 2: Extract the zip file and create a PHP folder
In this step, create a new folder on your Windows desktop and name it PHP. Then, extract the zip file into that new folder (ie PHP).
Step 3: Replace the new version of PHP instead of the old version
Next, go to the XAMPP folder on your computer and select the php folder. Then rename it to a name like php_5 and put the extracted new PHP folder in the XAMPP directory.
Step 4: Configure the Apache server
The next step is to configure the Apache server. To do this, you must open your XAMPP control panel. Then click on (httpd-xampp.conf) in the Apache section.
An httpd-xampp.config file will open on your page. Next, in the PHP-Module settings, delete the old lines of code as in the image below and replace the new lines of code.
LoadFile “D:/xampp/php/php5ts.dll” LoadFile "D:/xampp/php/libpq.dll" LoadModule php5_module “D:/xampp/php/php5apache2_4.dll”
LoadFile "D:/xampp/php/php7ts.dll" LoadFile "D:/xampp/php/libpq.dll" LoadModule php7_module "D:/xampp/php/php7apache2_4.dll"
Save the file and restart the XAMPP server. Done!
Dear user, we hope you would enjoy this tutorial, you can ask questions about this training in the comments section, or to solve other problems in the field of Eldernode training, refer to the Ask page section and raise your problem in it as soon as possible. Make time for other users and experts to answer your questions.