How To Upgrade PHP Version In XAMPP On Windows

How To Upgrade PHP Version In XAMPP On Windows

To update your current PHP version in the XAMPP server with Windows 11, 10 system, So you can update in two methods, first, you can do it using Windows CMD, and second, you can download the PHP version from the official website, and move the downloaded PHP directory to xampp/php directory on Windows system, it will upgrade your. php version.

How To Upgrade/Update PHP Version In XAMPP On Windows

Here are two methods on how to upgrade/update php version in xampp on Windows 11, 10; are as follows:

Method 1: To upgrade PHP in XAMPP by Download Latest PHP on Windows

To upgrade PHP in XAMPP on windows 11, 10, you can follow these steps:

  1. Download the latest version of PHP that is compatible with XAMPP from the official PHP website. Make sure to download the thread-safe version of PHP for Windows if you are using XAMPP on Windows.
  2. Extract the downloaded PHP archive to a temporary folder on your computer.
  3. Stop the Apache server in XAMPP by clicking on the “Stop” button in the XAMPP Control Panel.
  4. Navigate to the XAMPP installation directory and locate the “php” folder. Rename this folder to “php_old” to keep a backup of the existing PHP installation.
  5. Copy the extracted PHP files and folders from the temporary folder to the “PHP” folder in XAMPP.
  6. Start the Apache server in XAMPP by clicking on the “Start” button in the XAMPP Control Panel.
  7. Open a web browser and go to “http://localhost/dashboard/phpinfo.php” to verify that the new version of PHP has been installed and is working correctly.

Method 2: To upgrade/update PHP version in XAMPP on windows using cmd

You can upgrade PHP version in XAMPP using the command line or terminal by following these steps:

  1. Download the latest version of PHP that is compatible with XAMPP from the official PHP website. Make sure to download the thread-safe version of PHP for Windows if you are using XAMPP on Windows.
  2. Extract the downloaded PHP archive to a temporary folder on your computer.
  3. Open a terminal window and navigate to the XAMPP installation directory. On Windows, you can do this by typing the following command and pressing Enter:
    • cd C:\xampp
  4. Stop the Apache server in XAMPP by running the following command:
    • xampp\apache\bin\httpd.exe -k stop
  5. Navigate to the XAMPP “php” folder by running the following command:
    • cd php
  6. Rename the existing PHP folder to create a backup. You can do this by running the following command:
    • rename php php_old
  7. Copy the extracted PHP files and folders from the temporary folder to the XAMPP “php” folder. You can do this by running the following command:
    • xcopy C:\xampp\php /s /e
    • Note: Replace <path_to_extracted_php_files> with the actual path to the folder where you extracted the PHP files.
  8. Start the Apache server in XAMPP by running the following command:
    • xampp\apache\bin\httpd.exe -k start
  9. Open a web browser and go to “http://localhost/dashboard/phpinfo.php” to verify that the new version of PHP has been installed and is working correctly.

Note: It’s always recommended to backup your XAMPP installation before making any changes to it. Also, upgrading PHP in XAMPP may require you to update any extensions or libraries that you have installed.

Conclusion

That’s all; you have learned two methods to upgrade or update php version in XAMPP on windows 11, 10 system, we hope you found it useful.

Recommended PHP XAMPP & Windows Tutorials

AuthorAdmin

Greetings, I'm Devendra Dode, a full-stack developer, entrepreneur, and the proud owner of Tutsmake.com. My passion lies in crafting informative tutorials and offering valuable tips to assist fellow developers on their coding journey. Within my content, I cover a spectrum of technologies, including PHP, Python, JavaScript, jQuery, Laravel, Livewire, CodeIgniter, Node.js, Express.js, Vue.js, Angular.js, React.js, MySQL, MongoDB, REST APIs, Windows, XAMPP, Linux, Ubuntu, Amazon AWS, Composer, SEO, WordPress, SSL, and Bootstrap. Whether you're starting out or looking for advanced examples, I provide step-by-step guides and practical demonstrations to make your learning experience seamless. Let's explore the diverse realms of coding together.

Leave a Reply

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