PHP-FPM
The php-fpm service is started to serve a PHP application for all PHP stack
types: magento, shopware, and wordpress. It runs in a container with a
tiny built-in HTTP <-> FastCGI proxy that configures its behavior according to
the stack type.
Stack variables
php.version
When a custom image is not used, sets the PHP version of the php container image used.
php.image_uri
Specifies a custom image to run in a PHP-FPM web container and the dev
command. This should usually not be configured in the stack variables directly
and is automatically set when a custom image for a cluster or Essentials server
is used. For Standard stacks and higher, the use of
CodeDirect
allows for custom images to
automatically be configured on a web server, and when combined with the image
monitor
, on the core
server.
PHP ini settings
| Variable | php.ini setting | Default |
|---|---|---|
| php.max_input_vars | max_input_vars | 10000 |
| php.memory_limit | memory_limit | 1G |
| php.opcache.interned_strings_buffer | opcache.interned_strings_buffer | 32 |
| php.opcache.max_accelerated_files | opcache.max_accelerated_files | 100000 |
| php.opcache.memory_consumption | opcache.memory_consumption | 512 |
| php.opcache.validate_timestamps | opcache.validate_timestamps | 0 |
| php.post_max_size | post_max_size | 260M |
| php.realpath_cache_size | realpath_cache_size | 4M |
| php.realpath_cache_ttl | realpath_cache_ttl | 600 |
| php.upload_max_file_size | upload_max_file_size | 256M |
Magento env.php
The V4 stack provides a file /etc/php/env.php that contains a partial env.php
that can be merged at runtime with the complete settings provided in your
Magento settings. If you modify your env.php as follows, you can
pick up those settings while still allowing for future stack changes to automatically
occur.
<?php
return array_replace_recursive(
[
'db' => [
// ... settings ...
],
// ... settings ...
],
file_exists('/etc/php/env.php') ? include('/etc/php/env.php') : []
);
Last modified on July 5, 2026