Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Overview

  1. Setup
  2. Remove libapache2-mod-php7.4
  3. Install PHP 8.1
  4. Install php-fpm 7.4 and 8.1
  5. Enable php-fpm 7.4 and 8.1
  6. A update Virtual Hosts to use the appropriate PHP version
  7. Restart Apache

Setup

Install Repository

In order to complete this upgrade, a repository (repo) with all of the dependencies must be installed. Listed below are the suggested repos for each operating system.

How to Install:

// *************
// Ubuntu 20
// *************
sudo add-apt-repository ppa:ondrej/php

Remove libapache2-mod-php7.4

Why Remove?

The mod only allows a single PHP version running on the server and will interfere with php-fpm.

How to Remove:

// *************
// Ubuntu 20
// *************
sudo apt remove libapache2-mod-php7.4


Setup

Install and Enable PHP 8.1, PHP_FPM 8.1, and PHP_FPM 7.4

In order to complete this upgrade, a repository (repo) with all of the dependencies must be installed. Listed below are the suggested repos for each operating system.

How to Install:

// *************
// Ubuntu 20
// ************* 
sudo apt install php8.1 php8.1-fpm php7.4-fpm
a2enmod proxy_fcgi setenvif
a2enconf php7.4-fpm
a2enconf php8.1-fpm 
  • No labels