installphp.info


← Back to home page

Install PHP 8.3 on Ubuntu 24.04

This version of PHP is actively supported.

Good news! PHP 8.3 is being actively supported through 31 Dec 2025. 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 2027, at which point PHP 8.3 will be considered "end-of-life".

Installing PHP 8.3 on Ubuntu 24.04

Prerequisites

  • Ubuntu 24.04 system
  • Root or sudo access
  • Terminal access
  • Internet connection

Installation

  1. Update the system packages:

    sudo apt update && sudo apt upgrade -y
  2. Add the PHP repository:

    sudo add-apt-repository ppa:ondrej/php -y
  3. Install PHP 8.3:

    sudo apt install php8.3 -y
  4. Install common PHP extensions:

    sudo apt install php8.3-common php8.3-mysql php8.3-xml php8.3-curl php8.3-gd php8.3-imagick php8.3-cli php8.3-dev php8.3-imap php8.3-mbstring php8.3-opcache php8.3-soap php8.3-zip -y

Verification

  1. Check PHP version:

    php -v

    You should see output indicating PHP 8.3.x is installed.

  2. Verify PHP configuration:

    php -i

    This will display detailed PHP configuration information.

  3. Check installed PHP modules:

    php -m

    This will list all installed PHP modules.