Close Menu
Technoracle
    Facebook X (Twitter) Instagram
    Facebook X (Twitter) Instagram
    TechnoracleTechnoracle
    • Home
    • AWS
      • EC2
      • Lightsail
      • RDS
      • S3
    • Ubuntu
      • Ubuntu 20.04
      • Ubuntu 22.04
    • AI Tools
    • Web Hosting
    • WordPress
    • Tech News
    Technoracle
    Home - Ubuntu 20.04 - How to Install PHP 8.0 on Ubuntu 20.04
    Ubuntu 20.04

    How to Install PHP 8.0 on Ubuntu 20.04

    Rajesh ShivamBy Rajesh ShivamApril 25, 2023Updated:May 22, 2023No Comments2 Mins Read
    Install PHP 8.0 on Ubuntu

    PHP is among the most widely used server-side programming languages. The most popular CMS(Content Management System) WordPress also built with PHP. In this tutorial, I am going to explain how to install PHP 8.0 on Ubuntu 20.04 step by step, so let’s dive in.

    Page Contents

    Toggle
    • How to Install PHP 8.0 on Ubuntu 20.04
      • Step 1: Enabling Ondřej Surý PPA Repository
      • Step 2: Install PHP 8.0 with Apache on Ubuntu
      • Step 3: Install PHP 8 Extensions in Ubuntu
      • Step 4: Check PHP version to verify
      • Conclusion

    How to Install PHP 8.0 on Ubuntu 20.04

    Step 1: Enabling Ondřej Surý PPA Repository

    Currently PHP 7.4 is the default PHP version in Ubuntu 20.04 repositories. To install the latest version of PHP we have to run following commands

    $ sudo apt update
    $ sudo apt upgrade
    $ sudo apt install  ca-certificates apt-transport-https software-properties-common

    Next, add the PPA

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

    Press “Enter” on the keyboard.

    Install PHP 8.0 on Ubuntu

    Step 2: Install PHP 8.0 with Apache on Ubuntu

    Now again update the system with following command

    $ sudo apt update

    Now install PHP 8.0 with the Apache module as below.

    $ sudo apt install php8.0 libapache2-mod-php8.0 

    After installation complete, restart the Apache server again with following command.

    $ sudo systemctl restart apache2

    If you want to enable apache with PHP-FPM, run below command

    $ sudo apt install php8.0-fpm libapache2-mod-fcgid

    By default PHP-FPM not enable, to make it enable run following command

    $ sudo a2enmod proxy_fcgi setenvif
    $ sudo a2enconf php8.0-fpm

    Now restart Apache again to effect the changes

    $ sudo systemctl restart apache2

    Step 3: Install PHP 8 Extensions in Ubuntu

    Some extensions comes with the packages. Download them by following command.

    $ sudo apt install php8.0-[extension-name]

    Install Memcached, MySQL and GD extensions

    $ sudo apt install php8.0-mysql php8.0-gd php-memcached

    Step 4: Check PHP version to verify

    To make sure, you installed correct version of PHP in your linux machine, run following command

    $ php -v

    Now, PHP should be installed on your server.

    Conclusion

    In this tutorial you have learned PHP 8.0 installation. If you like this article, please feel free to share and also comment, if you have any question.

    Read Here

    • How to install LAMP on Ubuntu 20.04

    php latest version
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email Reddit
    Previous ArticleHow to Enable PHP Zip Extension in cPanel (3 Easy Steps)
    Next Article How to Install PHP on Ubuntu 22.04 [Simple Guide]
    Rajesh Shivam
    • LinkedIn

    Rajesh Shivam is a seasoned professional with expertise in AWS and Linux System Administration. With over 10 years of freelancing experience, he brings a wealth of knowledge to the table. Rajesh has a strong passion for technology and stays connected with the latest happenings in the field. His dedication and expertise make him a trusted resource for all things tech-related.

    Related Posts

    install CodeIgniter on Ubuntu 20.04
    Ubuntu

    How to Install CodeIgniter on Ubuntu 20.04

    Read More
    Zoom Keyboard Shortcuts for Ubuntu
    Ubuntu

    Zoom Keyboard Shortcuts for Ubuntu Users in 2022

    Read More
    Install BigBlueButton on Ubuntu 20
    Ubuntu

    How to Install BigBlueButton on Ubuntu 20.04 Easily

    Read More
    Add A Comment
    Leave A Reply Cancel Reply

    linux commands every user should know in 2025

    25 Must-Know Linux Commands Every User Should Master in 2025

    April 10, 2025
    TeamViewer and Ubuntu logos on gradient background – banner for how to install TeamViewer on Ubuntu 24.04 tutorial

    How to Install TeamViewer on Ubuntu 24.04 [Fast & Easy Steps]

    April 10, 2025
    Troubleshooting ‘Permission Denied (publickey)’ SSH error on a Linux server using secure terminal access

    Fix ‘Permission Denied (publickey)’ SSH Error on Linux [Step-by-Step Guide]

    April 8, 2025
    Blog banner showing Ubuntu logo, coding laptop, and icons for VS Code, Docker, and Git with the title 'Perfect Dev Setup in Ubuntu 24.04 – Step-by-step guide for developers' on a dark tech-themed background.

    How to Set Up the Perfect Development Environment on Ubuntu 24.04

    April 8, 2025

    Subscribe to Blog

    Enter your email address to subscribe to
    this blog and receive notifications of new posts by email.

    Facebook X (Twitter) Instagram Pinterest
    • Sitemap
    • Privacy Policy
    • Disclaimer
    • Term of Services
    © 2025 Technoracle

    Type above and press Enter to search. Press Esc to cancel.

    Click to Copy