Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the copy-the-code domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/pcx3.com/wp-includes/functions.php on line 6121

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pb-seo-friendly-images domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/pcx3.com/wp-includes/functions.php on line 6121

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the johannes domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/pcx3.com/wp-includes/functions.php on line 6121
Install PHP 8.0 on Debian 9 Plesk Server - PC✗3
Install PHP 8.0 on Debian 9 Plesk Server

Install PHP 8.0 on Debian 9 Plesk Server

To install PHP 8 on Debian 9 Plesk Server, add sury.org repository

apt install apt-transport-https lsb-release ca-certificates -y
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list

Install PHP 8 with apt

apt-get update
apt-get install php8.0 php8.0-fpm php8.0-cgi php8.0-mysql php8.0-xsl php8.0-xml php8.0-tidy php8.0-recode php8.0-mcrypt php8.0-mbstring php8.0-intl php8.0-gd php8.0-curl php8.0-json php8.0-imagick php8.0-bcmath php8.0-readline php8.0-sqlite3

Enable PHP 8 as default CLI

update-alternatives --config php

This will show all available PHP version, select the default version for command line.

Enable PHP 8 in Plesk

plesk bin php_handler --add -displayname "8.0 by sury.org" -path /usr/bin/php-cgi8.0 -clipath /usr/bin/php8.0 -phpini /etc/php/8.0/cgi/etc/php.ini -type cgi -id "php80-cgi"
plesk bin php_handler --add -displayname "8.0 by sury.org" -path /usr/bin/php-cgi8.0 -clipath /usr/bin/php8.0 -phpini /etc/php/8.0/cgi/etc/php.ini -type fastcgi -id "php80-fastcgi"
plesk bin php_handler --add -displayname "8.0 by sury.org" -path /usr/sbin/php-fpm8.0 -clipath /usr/bin/php8.0 -phpini /etc/php/8.0/fpm/etc/php.ini -type fpm -service php8.0-fpm -poold /etc/php/8.0/fpm/pool.d -id "php80-fpm"
whoami
Stefan Pejcic
Join the discussion

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.