installphp.info


← Back to home page

Install PHP 8.0 on Windows 7

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

PHP 8.0 reached end of life on 26 Nov 2023 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 8.0 on Windows 7

Prerequisites

  • Windows 7 (32-bit or 64-bit)
  • Administrator privileges
  • Internet connection
  • Web server (e.g., Apache or IIS) installed (optional)

Installation

  1. Visit the official PHP website: https://windows.php.net/download/
  2. Download the PHP 8.0 zip package (Thread Safe or Non-Thread Safe, depending on your web server)
  3. Extract the downloaded zip file to a directory of your choice (e.g., C:\php)
  4. Rename the extracted folder to "php"
  5. Add the PHP directory to your system's PATH environment variable:
    • Right-click on "Computer" and select "Properties"
    • Click on "Advanced system settings"
    • Click on "Environment Variables"
    • Under "System variables", find "Path" and click "Edit"
    • Add ";C:\php" to the end of the Variable value
    • Click "OK" to close all windows
  6. Copy php.ini-development to php.ini in the PHP directory
  7. Open php.ini and uncomment necessary extensions by removing the semicolon (;) at the beginning of the line
  8. Restart your computer to apply changes

Verification

  1. Open Command Prompt
  2. Type "php -v" and press Enter
  3. You should see output similar to:
    PHP 8.0.x (cli) (built: Month Day Year) ( ... )
    Copyright (c) The PHP Group
    Zend Engine v4.0.x, Copyright (c) Zend Technologies
            
  4. Create a test PHP file (e.g., test.php) with the following content:
    <?php
    phpinfo();
    ?>
            
  5. Save the file and run it through your web server or PHP's built-in server:
    php -S localhost:8000 test.php
            
  6. Open a web browser and navigate to http://localhost:8000
  7. You should see the PHP information page, confirming that PHP 8.0 is installed and working correctly