Technoracle
    Facebook Twitter Instagram
    • Sitemap
    • Privacy Policy
    • Disclaimer
    • Term of Services
    Facebook Twitter Instagram Pinterest Vimeo
    TechnoracleTechnoracle
    • Tutorials
      • Amazon Cloud
      • Google Cloud
    • How To
    • Blog
    • About
    Subscribe
    Technoracle
    Home»How To»How to Install PHP 8.0 on Ubuntu 20.04
    How To

    How to Install PHP 8.0 on Ubuntu 20.04

    Rajesh ShivamBy Rajesh ShivamApril 18, 2022Updated:April 18, 2022No Comments2 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
    Install PHP 8.0 on Ubuntu
    Share
    Facebook Twitter LinkedIn Pinterest Email
    Install PHP 8.0 on Ubuntu
    Php installation 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

    • 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
    Previous ArticleBest WordPress Hosting for Bloggers
    Next Article How To Reset WordPress Admin Password
    Rajesh Shivam

    Hello, everyone, I am Rajesh Shivam, I am a full-time freelancer with more than seven years plus experience in different freelancing platforms, in this blog, I am going to provide complete freelancing tips and tricks.

    Related Posts

    How To

    How to Install Microsoft Teams on Ubuntu 22.04 Easily

    February 22, 2023
    Read More
    How To

    What is Elastic IP and Its Pricing in AWS

    February 22, 2023
    Read More
    How To

    How to Convert PEM to PPK file [Step by Step Guide]

    February 22, 2023
    Read More
    Add A Comment

    Leave A Reply Cancel Reply

    Facebook Twitter Instagram Pinterest
    © 2023 Technoracle

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

    Go to mobile version