Best way to set and optimize PHP 8.3 as default in HestiaCP?

Hi everyone,

I’ve just installed PHP 8.3 on my HestiaCP server and I’d like to:

  1. Set PHP 8.3 as the default version for CLI and the system.
  2. Optimize its configuration for better performance (Opcache, JIT, memory, execution time) and allow larger uploads.

Currently, I’m doing the following:

  • Using update-alternatives to set PHP 8.3 as the default CLI version.
  • Editing /etc/php/8.3/fpm/php.ini to increase:
    • upload_max_filesize, post_max_size
    • memory_limit, max_execution_time, opcache settings, etc.
  • Restarting php8.3-fpm afterward.

Is this the recommended approach in HestiaCP?
Should I also tune any other files (like pool configs or Hestia-specific overrides) for PHP-FPM under Hestia?

Thanks in advance for your guidance!

Best regards

Hi @tanjohnson

To use PHP 8.3 as the default version, no. You must also change the www.conf added to the default PHP-FPM version and rebuild your web and mail domains.

Use this Hestia command to do all the steps automatically:

v-change-sys-php 8.3
1 Like

Thanks a lot for your support!

I was able to clean up all old PHP versions and set PHP 8.3 as the system default without any issues. Everything is working perfectly now.

1 Like