Explore information related to uninstall php 8 ubuntu

Install PHP 8 on Ubuntu 20.04 or 18.04 - Step by Step Process ?


This article covers steps to install PHP 8 on Ubuntu. PHP is arguably one of the most widely used server-side programming languages. It's the language of choice when developing dynamic and responsive websites. Basically, popular CM platforms such as WordPress, Drupal, and Magento are based on PHP.


To Install PHP as Apache Module

Run the commands:

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

Once the packages are installed, restart Apache for the PHP module to get loaded:

$ sudo systemctl restart apache2


To Configure Apache with PHP-FPM

Php-FPM is a FastCGI process manager for PHP. 

1. Run the following command to install the necessary packages:

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

2. By default PHP-FPM is not enabled in Apache. 

To enable it, run:

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

3. To activate the changes, restart Apache:

$ systemctl restart apache2 


To install PHP 8.0 with Nginx

Nginx doesn't have built-in support for processing PHP files. We'll use PHP-FPM ("fastCGI process manager") to handle the PHP files.

Run the following commands to install PHP and PHP FPM packages:

$ sudo apt update
$ sudo apt install php8.0-fpm

Once the installation is completed, the FPM service will start automatically. 

To check the status of the service, run

$ systemctl status php8.0-fpm

Do not forget to restart the Nginx service so that the new configuration takes effect:

$ sudo systemctl restart nginx

Read More




For Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on LinuxAPT.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com







Focus on your business, not your servers.

Click Here to Learn More