installphp.info


← Back to home page

Install PHP 8.0 on Windows 10

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 10

Prerequisites

  • Windows 10 operating system
  • Administrative privileges on your computer
  • Stable internet connection
  • Web server (e.g., Apache, Nginx) installed (optional)

Installation

  1. Visit the official PHP website: https://www.php.net/downloads.php
  2. Download the PHP 8.0 Windows ZIP package (Thread Safe or Non-Thread Safe, depending on your web server)
  3. Extract the ZIP file to a directory of your choice (e.g., C:\php)
  4. Rename the extracted folder to 'php'
  5. Add the PHP directory (C:\php) to your system's PATH environment variable:
    • Open System Properties
    • Click on "Environment Variables"
    • Under "System variables", find and edit "Path"
    • Add the PHP directory (C:\php) to the list
  6. Copy the php.ini-development file to php.ini in the same directory
  7. Open php.ini and uncomment the required extensions by removing the semicolon (;) at the beginning of the line
  8. Save the php.ini file

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: ...) ( ... )
    Copyright (c) The PHP Group
    Zend Engine v4.0.x, Copyright (c) Zend Technologies
            
  4. To verify PHP is working with your 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