installphp.info


← Back to home page

Install PHP 7.2 on Windows 10

Warning! This PHP version is end-of-life!

PHP 7.2 reached end of life on 30 Nov 2020 and is no longer being updated. It's strongly recommended to upgrade to the latest version as soon as possible. You can read the official PHP migration guide here.

Installing PHP 7.2 on Windows 10

Prerequisites

  • Windows 10 operating system
  • Administrative access to your computer
  • Stable internet connection
  • Web server (e.g., Apache, Nginx) installed (optional)

Installation

  1. Visit the official PHP website: https://windows.php.net/download/
  2. Download the PHP 7.2 zip package for Windows (x64 Non Thread Safe)
  3. Create a new folder in C:\ drive named 'php'
  4. Extract the downloaded zip file to C:\php
  5. Rename 'php.ini-development' to 'php.ini' in the C:\php folder
  6. Open the System Environment Variables settings
  7. Add C:\php to the Path variable
  8. Restart your computer to apply the changes

Verification

  1. Open Command Prompt
  2. Type 'php -v' and press Enter
  3. You should see output similar to:
    PHP 7.2.x (cli) (built: Month Day Year) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
                    
  4. Create a test PHP file named 'info.php' in your web server's root directory with the following content:
    <?php phpinfo(); ?>
                    
  5. Access the file through your web browser (e.g., http://localhost/info.php)
  6. If you see the PHP information page, the installation is successful