installphp.info


← Back to home page

Install PHP 7.4 on Windows 7

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 7

Prerequisites

  • Windows 7 (32-bit or 64-bit)
  • Administrative privileges on your computer
  • Internet connection for downloading PHP
  • Web server software (e.g., Apache or IIS) installed (optional)

Installation

  1. Visit the official PHP downloads page: https://windows.php.net/download#php-7.4
  2. Download the appropriate version (Thread Safe or Non-Thread Safe) for your system architecture (x86 for 32-bit, x64 for 64-bit)
  3. Extract the downloaded ZIP file to a folder of your choice (e.g., C:\php7.4)
  4. Rename the extracted folder to 'php'
  5. Add the PHP folder path to your system's PATH environment variable:
    1. Right-click on 'Computer' and select 'Properties'
    2. Click on 'Advanced system settings'
    3. Click on 'Environment Variables'
    4. Under 'System variables', find and select 'Path', then click 'Edit'
    5. Add ';C:\php' to the end of the 'Variable value' field
    6. Click 'OK' to close all dialogs
  6. Copy php.ini-development to php.ini in the PHP folder
  7. Open php.ini and uncomment necessary extensions by removing the semicolon (;) at the beginning of the line

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) ( NTS )
    Copyright (c) The PHP Group
    Zend Engine v3.4.0, Copyright (c) Zend Technologies
            
  4. To verify PHP is working with your web server, create a file named 'info.php' in your web root with the following content:
    <?php phpinfo(); ?>
            
  5. Access the file through your web browser (e.g., http://localhost/info.php)
  6. You should see the PHP information page displaying details about your PHP installation