PHP upgrade guidelines
NB: This options is only available if the product was installed as a Debian package, either from APT repository or manually.
When installing the product, PHP is installed as dependency, and usually it would be PHP version available from APT repository of your Linux distribution. It may be outdated though, as Ubuntu 20.04 ships PHP 7.4, and Ubuntu 22.04 offers PHP 8.1 by default. You can upgrade your PHP setup to the latest version by following these instructions.
The example assumes you have installed Aurora Corporate on Ubuntu 22.04 with PHP 8.1 and are upgrading it to PHP 8.3, but it's easily adjusted to other cases with a different PHP version used.
- Add repository and install packages:
add-apt-repository ppa:ondrej/php
apt update
apt install php8.3 php8.3-cli php8.3-curl php8.3-common php8.3-fpm php8.3-gd php8.3-mbstring php8.3-mysql php8.3-opcache php8.3-readline php8.3-xml
- Backup configuration files:
cp -r /etc/php/8.3 /etc/php/8.3_distr
- Update PHP configuration:
cp /opt/afterlogic/templates/php.ini.j2 /etc/php/8.3/fpm/php.ini
cp /opt/afterlogic/templates/www.conf.j2 /etc/php/8.3/fpm/pool.d/www.conf
cp /opt/afterlogic/templates/php-fpm.conf.j2 /etc/php/8.3/fpm/php-fpm.conf
sed -i -e "s/#phpver#/8.3/g" /etc/php/8.3/fpm/php-fpm.conf
- Stop and disable old PHP service:
service php8.1-fpm stop
update-rc.d php8.1-fpm disable
- Restart PHP and Nginx services:
/etc/init.d/php8.3-fpm restart
/etc/init.d/nginx restart