installphp.info


← Back to home page

Install PHP 7.0 on Windows 11

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 11

Prerequisites

  • Windows 11 operating system
  • Administrator 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 website: https://windows.php.net/download/
  2. Download the PHP 7.0 ZIP package for Windows (VC14 x64 Non 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 in a text editor and uncomment the following lines by removing the semicolon (;) at the beginning:
    • extension=php_mysqli.dll
    • extension=php_pdo_mysql.dll
    • extension_dir = "ext"
  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.0.33 (cli) (built: Dec  5 2018 15:44:17) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.0.0, Copyright (c) 1998-2018 Zend Technologies
                    
  4. To test PHP with a web server, create a file named "info.php" in your web server's document root with the following content:
    <?php phpinfo(); ?>
                    
  5. Access the file through your web browser (e.g., http://localhost/info.php)
  6. If you see a page with detailed PHP configuration information, the installation is successful