You can adjust a wide variety of PHP's default settings, with a .htaccess file.
The file is placed in the folder where you want the changes to apply. The changes apply to all files and subfolders. Note the file should be called ".htaccess" and if it does not already exist you have to create it yourself with eg. an FTP program.
You can see a list of all PHP settings here: http://www.php.net/manual/en/ini.list.php
The settings you want to change just stand on a line in the .htaccess file. Some popular options are:
php_flag display_errors off
php_value session.gc_maxlifetime 3600
php_value upload_max_filesize 512M
php_value post_max_size 512M
php_value max_execution_time 600
php_value max_input_vars 20000
php_value always_populate_raw_post_data -1
php_flag opcache.enable off
php_value opcache.revalidate_freq 60
Some settings can also be set directly in the PHP code, with the ini_set() function. Details of settings, etc. can be found in the PHP manual: http://php.net/manual/en/ini.list.php
You can test if the changes are set correctly by looking in phpinfo()
. Note this is the "Local-value" column that applies.
Article from the support category: PHP