Check version on the server
php -v
Upgrade PHP8.3 using the command below:
sudo apt update
sudo apt install -y \
php8.3-cli \
php8.3-fpm \
php8.3-common \
php8.3-curl \
php8.3-intl \
php8.3-gd \
php8.3-mbstring \
php8.3-mysql \
php8.3-soap \
php8.3-xml \
php8.3-zip \
php8.3-imap \
php8.3-ldap \
php8.3-bcmath \
php8.3-opcache \
php8.3-readline
Verify
php8.3 -v
Note: you should see version 8.3.36 on the terminal.
Restart your PHP services
sudo systemctl restart php8.3-fpm
Restart or reload your web server
sudo systemctl reload apache2
or
sudo systemctl reload nginx