installphp.info


← Back to home page

Install PHP 8.2 on Windows 10

This version of PHP is actively supported.

Good news! PHP 8.2 is being actively supported through 31 Dec 2024. After that point, it's advisable to upgrade to the latest version, since the PHP team will only offer security-related support until 31 Dec 2026, at which point PHP 8.2 will be considered "end-of-life".

Installing PHP 8.2 on Windows 10

Prerequisites

  • Windows 10 (64-bit recommended)
  • Administrative privileges on your computer
  • Internet connection for downloading PHP
  • Web server software (e.g., Apache, Nginx) if you plan to use PHP for web development

Installation

  1. Download PHP 8.2 for Windows:

    https://windows.php.net/download#php-8.2
  2. Choose the appropriate version (Thread Safe or Non-Thread Safe) based on your web server.

  3. Extract the downloaded ZIP file to a directory of your choice (e.g., C:\php).

  4. Add the PHP directory to your system's PATH environment variable:

    1. Right-click on 'This PC' or 'My 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. Click 'New' and add the path to your PHP directory (e.g., C:\php)
    6. Click 'OK' to close all dialogs
  5. Rename php.ini-development to php.ini in your PHP directory.

  6. Open php.ini and make any necessary changes for your environment.

Verification

  1. Open a command prompt and type:

    php -v

    This should display the installed PHP version (8.2.x).

  2. To check if PHP is working correctly, create a file named info.php with the following content:

    <?php phpinfo(); ?>
  3. Place the file in your web server's document root and access it through a web browser (e.g., http://localhost/info.php).

  4. If you see a page with detailed PHP configuration information, the installation was successful.