Step-by-Step Guide: Updating PHP from Version 8.1 to 8.3 on Linux (ubuntu)
Simply follow the commands below to effortlessly upgrade PHP from version 8.1 to 8.3 on your Ubuntu operating system:
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
in my case Nginx
sudo apt-get update
Install PHP 8.3
sudo apt install php8.3
Install PHP 8.3 Package
sudo apt install php8.3-common php8.3-mysql php8.3-xml php8.3-xmlrpc php8.3-curl php8.3-gd php8.3-imagick php8.3-cli php8.3-dev php8.3-imap php8.3-mbstring php8.3-opcache php8.3-soap php8.3-zip php8.3-intl -y
php -v
Install PHP 8.3 FPM for Nginx
For the Nginx web server, you need to install the FPM service, you can install it using the following command:
apt install php8.3-fpm
Once the installation has been completed, you can confirm that the PHP-FPM
service has been installed correctly with the following command:
systemctl status php8.3-fpm