PHP version switching

Hi, I would like to know if I am switching the PHP from default to PHP-8_4, what template I need to update? anything related to my custom templates from /apache2/php-fpm and /nginx?

Or I just simply switch from here?

Hi @jasonwch

If you are using default as backend template in your web domain and you want to switch to PHP 8.4, you just need to select it in the drop-down list.

If for example, you are using the backend template socket, it will use the default php version (by default it’s 8.3) so in this case, if you only want to use socket and PHP 8.4 for one of your web domains, you must create another template adding to the name the right PHP version.

cd /usr/local/hestia/data/templates/web/php-fpm/
cp socket.tpl socket-PHP-8_4.tpl

And now, you can select socket-PHP-8_4 from Hestia.

Regarding your custom templates in apache2… you don’t need to modify them.

Thanks so much, I just customized my template at

/usr/local/hestia/data/templates/web/apache2/php-fpm

So I think I think I can just select PHP 8.4 right away?

Is it the templates inside this is for PHP.ini customization? (e.g. upload size…etc)

/usr/local/hestia/data/templates/web/php-fpm

Yes.

You can modify the PHP template to modify some php options but the main config file for php is /etc/php/X.Y/fpm/php.ini

So the web/php-fpm templates will trigger to use respective /etc/php/8.X/fpm/php.ini?

Btw, there are some differences when comparing default and php-8.4 tpl. Is it something intended? and would you mind to explain a bit more on this? Thanks so much

@sahsanu may i have your advise on this?

thanks so much

I would need to review the code to understand the reason for the differences, but if you want to use one, use the PHP-X_Y.tpl.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.