How to Install PHP 8.0 on Ubuntu 20.04 LTS

$ sudo apt update
$ sudo apt upgrade
$ sudo apt install software-properties-common

Step 1: Add the Ondřej Surý PPA Repository

$ sudo add-apt-repository ppa:ondrej/php
$ sudo apt update

Step 2: Installing PHP 8.0 with

$ sudo apt install php8.0 libapache2-mod-php8.0
$ service apache2 start
$ service apache2 restart
$ service apache2 status
$ sudo apt install php8.0-fpm
$ sudo systemctl status php8.0-fpm
$ sudo systemctl restart nginx
$ php -vOutput:-PHP 8.0.0RC3 (cli) (built: Nov  27 2020 12:26:22) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.0-dev, Copyright (c) Zend Technologies
with Zend OPcache v8.0.0RC3, Copyright (c), by Zend Technologies

Step 3: Install PHP 8 Extensions on Ubuntu 20.04

apt-get 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 -y

Step 4: Verify PHP 8 Installation on Ubuntu

$ sudo vim /var/www/html/info.php
<?php
phpinfo();
?>
$ service apache2 start     OR  $ service nginx start
$ service apache2 stop OR $ service nginx stop
$ service apache2 status OR $ service nginx status
$ service apache2 restart OR $ service nginx restart

--

--

--

Im Youtuber

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Python Speech To Text

Manually Triggering GitHub Actions Workflows Using Postman

Learn to code enough

Dare! Or how to saved 6M euro in routine HR job

Motivation to do your best every day — The Light Bulb Theory

Day 9: 100 Days of Code — 7–13–2019

[Tech] List of Remote Internship Opportunites mostly to Open Source Projects …

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
ve Techno

ve Techno

Im Youtuber

More from Medium

Windows Server 2019 Installation & Setup in Fusion!

What is working vue.

Auto Save Example In PHP & MYSQL.

Auto Save Example In PHP & MYSQL.

How to Install GlitchTip on Ubuntu 18.04