installphp.info


← Back to home page

Install PHP 7.3 on macOS 11

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

PHP 7.3 reached end of life on 06 Dec 2021 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.3 on macOS 11

Prerequisites

  • macOS 11 (Big Sur) installed
  • Admin access to your Mac
  • Homebrew package manager installed
  • Terminal application

Installation

  1. Open Terminal
  2. Update Homebrew:
    brew update
  3. Install PHP 7.3:
    brew install [email protected]
  4. Link PHP 7.3:
    brew link [email protected]
  5. Add PHP to your PATH:
    echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc
  6. Reload your shell configuration:
    source ~/.zshrc

Verification

  1. Check PHP version:
    php -v
  2. Expected output:
    PHP 7.3.x (cli) (built: ...) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.3.x, Copyright (c) 1998-2018 Zend Technologies
  3. Verify PHP configuration:
    php -i