Creating and modifying the .user.ini file
You can change the PHP configuration with a .user.ini file (NB! The filename starts with a dot). By default, the .user.ini file doesn’t exist on the server and it can be created to a folder where it will be applied automatically to all the subfolders.
The changes in .user.ini will apply to both HTTP and HTTPS host.
NB! .user.ini can be used for PHP_INI_PERDIR, PHP_INI_USER and PHP_INI_ALL settings – for PHP_INI_SYSTEM settings (i.e. opcache parameters) the global php.ini still must be used. You can find the list of php.ini directives here: http://php.net/manual/en/ini.list.php
Examples for changing PHP settings
Max execution time
By default, the maximum execution time for PHP scripts is set to 30 seconds. Changing it to 10 minutes (600 seconds) looks like this:
max_execution_time = 600
PHP Memory limit
By default, the memory limit is set to 1024M. To increase it to 1500M, add the following line:
memory_limit = 1500M
Changing a NewRelic application name
newrelic.appname = "My app"
By default, displaying PHP errors is turned on and to turn them off, add the following line. You can use
display_errors to turn on/off displaying PHP errors and to turn them off, add the following line:
display_errors = off