installphp.info


← Back to home page

Install PHP 7.0 on Windows 7

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

PHP 7.0 reached end of life on 03 Dec 2018 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.0 on Windows 7

Prerequisites

  • Windows 7 (32-bit or 64-bit)
  • Administrator access
  • Stable 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 7.0 Windows zip package (VC14 x86 Thread Safe or Non-Thread Safe)
  3. Extract the downloaded zip file to a folder (e.g., C:\php7)
  4. Copy php.ini-development to php.ini in the same folder
  5. Open php.ini and make the following changes:
    • Uncomment extension_dir = "ext"
    • Uncomment required extensions (e.g., mysql, gd2, etc.)
  6. Add C:\php7 to your system's PATH environment variable
  7. Restart your computer

Verification

  1. Open Command Prompt
  2. Type php -v and press Enter
  3. You should see output similar to:
    PHP 7.0.33 (cli) (built: Dec  5 2018 15:40:04) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.0.0, Copyright (c) 1998-2018 Zend Technologies
                    
  4. Create a PHP file (e.g., test.php) with the following content:
    <?php
    phpinfo();
    ?>
                    
  5. Run the file through your web server or use PHP's built-in server: php -S localhost:8000
  6. Open a web browser and navigate to http://localhost:8000/test.php
  7. You should see the PHP information page, confirming successful installation