What is PHP?
PHP is a server-side scripting language used by platforms such as WordPress, Magento, Drupal, Laravel and Symfony. It runs on the server to generate the pages and API responses your visitors receive.
On a modern stack, PHP runs through PHP-FPM (FastCGI Process Manager), a pool of worker processes that the web server hands dynamic requests to. The PHP version and pool tuning directly affect both compatibility with your app and the performance under load.
On TurboStack
TurboStack runs PHP as a per-application runtime. Multiple PHP versions can run side by side on the same host.
-
Each application picks its own PHP version via
php_version(for example"8.4"), so different sites on one host can run different versions. -
Each application runs in its own PHP-FPM pool, isolating its workers, tuning and resource usage from other sites.
-
At the host level,
php_versionslists the PHP versions installed andphp_main_versionsets the default. -
Optional per-application tuning covers PHP-FPM process management, OPcache (including preloading) and ionCube support - see Configure PHP.
Tip
We recommend PHP 8.4 (or newer), or the highest version your application officially supports. Newer PHP versions are faster and receive security updates for longer.
Best practices
-
Run the newest PHP version your application supports; keep an upgrade path in mind for older sites.
-
Set
php_versionexplicitly per application rather than relying on the host default, so upgrades are deliberate. -
Enable OPcache for production sites, and consider OPcache preloading for frameworks that benefit from it.
-
Tune PHP-FPM process manager values to match each site's traffic instead of using one profile for everything.
-
Test version upgrades on a copy of the site before changing production.