You can customize the PHP settings for your environment using a
php.ini file that is appended to the configuration maintained by Adobe Commerce.
In your repository, add the
php.ini file to the root of the application (the repository root).
Configuring PHP settings improperly can cause issues. We recommend only advanced administrators set these options.
Increase PHP memory limit
To increase the PHP memory limit, add the following setting to the
1 memory_limit = 1G
For debugging, increase the value to 2G.
Optimize realpath_cache configuration
Set the following
realpath_cache settings to improve application performance.
1 2 3 4 5 6 7 8 9 ; ; Increase realpath cache size ; realpath_cache_size = 10M ; ; Increase realpath cache ttl ; realpath_cache_ttl = 7200
These settings allow PHP processes to cache paths to files instead of looking them up each time a page loads. See Performance Tuning in the PHP documentation.
For a list of recommended PHP configuration settings, see Required PHP settings.
Check custom php.ini settings
After pushing the
php.ini changes to your Cloud environment, you can check that the custom PHP configuration has been added to your environment by creating an SSH tunnel to your environment and entering:
1 cat /etc/php5/fpm/php.ini
If you use Cloud Docker for Commerce for local development, see Docker service containers for information about using a custom
php.ini file in a Docker environment.