How to Update PHP Version in XAMPP

5 min read

Step-by-Step guide on how to update PHP version in XAMPP Windows

How to update PHP version in XAMPP

How do I update PHP version in XAMPP is a common query among web developers, especially newbies. We created a straightforward article to explain how to quickly upgrade the PHP version on Windows XAMPP in response to the numerous enquiries we received on the subject. For web developers, XAMPP is an essential tool. For building and testing local websites, it’s one of the most used stacks. It is well-liked because even if the code is flawed, the live online platform is unaffected. You may greatly advance your web building abilities by doing this. WordPress developers frequently use this technique as well. The majority of people are still confused about how to upgrade or alter the PHP version in XAMPP.

In just four easy steps, this tutorial will show you how to update the PHP version in XAMPP. Prior to starting, it’s crucial to comprehend why updating the PHP version in XAMPP is vital and when it’s finest to do so.

Reasons to Upgrade PHP Versions in XAMPP

There are often differences in the requirements for PHP versions depending on the specifications of your project. Sometimes, it is the users that demand a higher version of PHP. This can make it difficult for you to upgrade it. Most users and developers update their PHP versions immediately after a new version is released to prevent security threats. As a member of various developer communities, I frequently see developers still using older versions of XAMPP (i.e. XAMPP 3.2.1 and older that runs on PHP 5.

They are mainly concerned about updating PHP versions in their current XAMPP, without reinstalling it. PHP 7 has a more extensive set of functions than PHP 5. This is why PHP 7 should be updated as soon as possible. To check the PHP version, type http://localhost/phpinfo.php in your browser, and a new screen will appear with the PHP version information. Let’s take a look at PHP 7, which is a better choice than PHP 5.

  1. PHP 7 is faster than any version of PHP 5, for starters. Imagine that you’ve written PHP code in PHP 5. Now, PHP 7 will make it faster than any other version.
  2. PHP 7 is more efficient than older PHP versions in handling errors. You would be able to see how difficult it is to correct fatal errors if you’re using PHP 5.
  3. PHP 7 now supports the anonymous classes. This feature isn’t available in older PHP versions. Anonymous class can be used to speed up execution time, which is also common in OOP languages such as JAVA and C#.
  4. PHP 7 supports 64-bit (large) files that can be run on 64-bit OS architecture. This feature is not available on PHP 5.
  5. PHP 7 includes null coalescing operators, type declarations that are precise, and many other advanced features.
Related Post  Make a Video Shareable on Facebook

We now know how important it is for PHP versions to be updated in XAMPP.

  • Let’s continue and learn how we can do this in just 4 steps.
  • PHP 7.0.0 was released on December 3rd, 2015. It has a number of other advantageous characteristics, which I will list below:–
  • PHP 7 is nearly twice as fast as the previous versions of PHP.
  • Memory consumption is very low.
  • makes it easier to deal with errors
  • Support for 64-Bit Windows Operating Systems
  • Operators for a new spaceship and null coalescing are introduced.
  • Allows for Accurate Type Declarations to be made.
  • Classes with no names are added.
  • Imports from the same namespace are made easier with this feature.
  • Null coalescing, the Spaceship operator, and other features are now available.
  • More information can be found at

Now I’m going to show you how you can get out of this situation successfully. php-5.6.36 is the version of PHP that I am currently running.

In 4 Easy Steps, How to Update PHP Version on Windows XAMPP

The beauty of XAMPP is that it’s a development and not a production server. You can modify its configuration, such as changing the PHP version, without impacting your live application. Note: Before you upgrade PHP version to XAMPP, I recommend making a backup of your site files and project files. ALWAYS MAKE A BACKUP FOR DATA. It is easy to update PHP version in XAMPP. These are the steps to follow.

Step 1: Download the most recent version of PHP (i.e. PHP 7.x

To download the most recent binary version of PHP, click here. As you can see, the Thread Secure Zip file depends on your Windows version ( x86 for 32-bit or x64 64-bit),   The above image shows that I downloaded the VC14x64 Thread Secure as my Windows version is 64-bit.

Step 2: Extract the Zip File, and create a PHP Folder

Next, create a folder on your Windows desktop with the name PHP. Next, extract the Zip file to that folder (i.e. PHP.

Step 3: Rename the old PHP folder

Next, open XAMPP folder. Select the php folder. Rename it with something like php_5. Then paste the extracted-new php folder to XAMPP directory. As you can see, I did this as shown in the image below.

Step 4: Configuring Apache Server

Next, configure the Apache web server. To do this, open your control panel and click on Apache Configure > Apache . (httpd-xampp.conf).   An httpdxampp.config will then open on your screen. The PHP Module setup will open. Next, copy the new lines of code into the HTML-Module setup . Finally, remove the old lines of code as shown in this image.

Previous lines:



LoadModule php5_module”D:/xampp/php/php5apache2_4.dll”




LoadModule php7_module”D:/xampp/php/php7apache2_4.dll”

Next, save this file and restart the XAMPP Server. It’s done! It’s done.


If you want your WordPress website to work smoothly, updating your PHP version is a must. While this article outlined how to manually update your PHP version, there is WordPress maintenance services that can take care of these tasks so you can concentrate on your business. This tutorial will teach you how to update PHP version in XAMPP.

Related Post  Best Settings For Litespeed Cache

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge