installphp.info


← Back to home page

Install PHP 7.4 on Windows 11

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

PHP 7.4 reached end of life on 28 Nov 2022 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.4 on Windows 11

Prerequisites

  • Windows 11 operating system
  • Administrative privileges on your computer
  • Stable internet connection
  • At least 100MB of free disk space

Installation

  1. Visit the official PHP website: https://windows.php.net/download#php-7.4
  2. Download the PHP 7.4 ZIP package for Windows (x64 Thread Safe)
  3. Create a new folder in C:\ drive named 'php'
  4. Extract the contents of the downloaded ZIP file into C:\php
  5. Rename the file 'php.ini-development' to 'php.ini'
  6. Open the 'php.ini' file with a text editor and uncomment the following extensions by removing the semicolon:
    • extension=curl
    • extension=mbstring
    • extension=openssl
  7. Add C:\php to your system's PATH environment 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.4.x (cli) (built: Month Day Year) ( ... )
    Copyright (c) The PHP Group
    Zend Engine v3.4.0, Copyright (c) Zend Technologies
                    
  4. To verify PHP is working correctly, create a file named 'test.php' with the following content:
    <?php
    phpinfo();
    ?>
                    
  5. Save the file and run it using the command: 'php test.php'
  6. If PHP is installed correctly, you should see detailed information about your PHP configuration