php,

How to Install PHP 8 on Ubuntu 23.04

May 10, 2023 · 1 min read · Post a comment

Installing PHP 8 on Ubuntu 23.04 through ppa:ondrej/php repository is a safe and quick process. Let’s take a look.

Prerequisites

  • sudo privileges

Install PHP 8 on Ubuntu 23.04

Step 1. Update the packages.

sudo apt update
sudo apt upgrade

Step 2. Add the ondrej/php PPA to your system by running the following command.

sudo add-apt-repository ppa:ondrej/php

Step 3. Update the package list again to include the PHP packages from the PPA.

sudo apt update

Step 4. Install PHP 8 along with some commonly used extensions.

sudo apt install php8.0 php8.0-cli php8.0-fpm php8.0-mysql php8.0-curl php8.0-gd php8.0-mbstring php8.0-xml php8.0-zip

Step 5. Verify that PHP 8 is installed and running by running the following command.

php -v

Conclusion

Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.