- Install the latest PHP via apt – i installed 8.1
- edit /etc/php/8.1/fpm/php.ini and set the mysql socket
- pdo_mysql.default_socket= “/opt/bitnami/mysql/tmp/mysql.sock”
- mysqli.default_socket = “/opt/bitnami/mysql/tmp/mysql.sock”
- edit /etc/php/8.1/fpm/pool.d/www.conf, remove contents and put in the following:
[www]
include=/opt/bitnami/php/etc/environment.conf
include=/opt/bitnami/php/etc/common.conf
listen=/opt/bitnami/php/var/run/www.sock
user=daemon
group=daemon
listen.owner=daemon
listen.group=daemon
pm=ondemand
pm.max_children=5
pm.start_servers=2
pm.min_spare_servers=1
pm.max_spare_servers=3
pm.max_requests=5000
include=/opt/bitnami/apps/wordpress/conf/php-fpm/pool.conf
include=/opt/bitnami/apps/phpmyadmin/conf/php-fpm/pool.conf
- Stop the php-fpm server:
opt/bitnami/ctlscript.sh stop php-fpm
- Edit /opt/bitnami/php/scripts/ctl.sh and update the following (make sure you’ve chosen the correct new values)
- PHPFPM_PIDFILE=”/var/run/php/php8.1-fpm.pid”
- PHPFPM_SERVER=”/usr/sbin/php-fpm8.1″
- PHPFPM_CONFIG_FILE=”/etc/php/8.1/fpm/php-fpm.conf”
- PHP_INI=”/etc/php/8.1/fpm/php.ini”
- Restart the php-fpm server
opt/bitnami/ctlscript.sh start php-fpm