installphp.info


← Back to home page

Install PHP 8.0 on Ubuntu 23.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 Ubuntu 23.10

Prerequisites

  • Ubuntu 23.10 installed and updated
  • Root or sudo access to the system
  • Terminal access
  • Internet connection

Installation

  1. Add the PHP repository:

    sudo add-apt-repository ppa:ondrej/php
  2. Update the package list:

    sudo apt update
  3. Install PHP 8.0:

    sudo apt install php8.0
  4. Install common PHP extensions:

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

Verification

  1. Check the PHP version:

    php -v

    You should see output indicating PHP 8.0.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.