Difference between revisions of "Upgrade to PHP 8.1"

From rbachwiki
Jump to navigation Jump to search
Line 20: Line 20:
  sudo a2dismod php7.4
  sudo a2dismod php7.4
  sudo a2enmod php8.1
  sudo a2enmod php8.1
sudo systemctl restart apache2

Revision as of 18:14, 29 November 2022

sudo apt install software-properties-common
sudo apt update

Add the Repository

sudo add-apt-repository ppa:ondrej/php

Next, update the system repositories to start using the PPA

$ sudo apt update
$ sudo apt install php8.1 libapache2-mod-php8.1
$ sudo systemctl restart apache2
sudo nano /etc/php/8.1/apache2/php.ini
upload_max_filesize = 32M 
post_max_size = 48M 

Replace the current enabled PHP version with your version.

sudo a2dismod php7.4
sudo a2enmod php8.1
sudo systemctl restart apache2