installphp.info


← Back to home page

Install PHP 7.1 on Windows 11

This version of PHP is actively supported.

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

Installing PHP 7.1 on Windows 11

Prerequisites

  • Windows 11 operating system
  • Administrative privileges on your computer
  • Stable internet connection
  • At least 100MB of free disk space

Installation

  1. Visit the official PHP website: https://windows.php.net/download/
  2. Scroll down to the PHP 7.1 section and download the ZIP package for your system architecture (x64 or x86)
  3. Extract the downloaded ZIP file to a folder of your choice (e.g., C:\php7.1)
  4. Open the extracted folder and locate the php.ini-development file
  5. Rename php.ini-development to php.ini
  6. Open php.ini with a text editor and uncomment the following lines by removing the semicolon (;) at the beginning:
    • extension=curl
    • extension=mbstring
    • extension=openssl
  7. Save the changes to php.ini
  8. Add the PHP installation directory to your system's PATH environment variable:
    1. Open the Start menu and search for "Environment Variables"
    2. Click on "Edit the system environment variables"
    3. Click the "Environment Variables" button
    4. Under "System variables", find and select the "Path" variable, then click "Edit"
    5. Click "New" and add the path to your PHP installation folder (e.g., C:\php7.1)
    6. Click "OK" to close all dialogs

Verification

  1. Open a new Command Prompt window
  2. Type the following command and press Enter:
    php -v
  3. You should see output similar to:
    PHP 7.1.x (cli) (built: ...)
  4. To verify that PHP is working correctly, 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 was successful