How to Install PHP 8 on Ubuntu 23.04

Jun 05, 2023 · 1 min read · Post a comment

Installing PHP 8 on Ubuntu 23.04 can’t be done through ppa:ondrej/php because the repo is not supported on Ubuntu 23.04. The best option is to get PHP 8.1 version which is very similar to PHP 8.0


  • sudo privileges

Install PHP 8 on Ubuntu 23.04

Step 1. Update the packages.

sudo apt update

Step 2. Install it.

sudo apt install php8.1

Step 5. Verify that PHP 8 is installed.

php -v


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