PHP-FPM

Run a PHP-FPM web container on a core server (Essentials) or on a web server.

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

Variablephp.ini settingDefault
php.max_input_varsmax_input_vars10000
php.memory_limitmemory_limit1G
php.opcache.interned_strings_bufferopcache.interned_strings_buffer32
php.opcache.max_accelerated_filesopcache.max_accelerated_files100000
php.opcache.memory_consumptionopcache.memory_consumption512
php.opcache.validate_timestampsopcache.validate_timestamps0
php.post_max_sizepost_max_size260M
php.realpath_cache_sizerealpath_cache_size4M
php.realpath_cache_ttlrealpath_cache_ttl600
php.upload_max_file_sizeupload_max_file_size256M

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') : []
);
Have questions not answered here? Contact Support to get more help.

Last modified on July 5, 2026