Most settings for PHP can be configured via a file called ".user.ini" as defined by the user_ini.filename php.ini setting. This file is a built-in option for PHP and generally works on any PHP . This file can hold php.ini directives, one setting per line. Settings listed as "INI_ANY" or "INI_PERDIR" in the list of settings can be used within this file.
Using the .user.ini file:
- Create a text file with the control panel's file manager and call it ".user.ini" (ensure the file name begins with a period)
- This file can be created with a plain text editor (notepad, text editor, etc but not Word) and uploaded via FTP, however, some systems do not like having the a period as the starting character.
- Add the PHP setting to a new line within the file.
- See examples below
- Save the file to the server within the directory where the PHP script is running at
- Normally, this will be your httpdocs, htdocs, or directory named after the domain
- Wait about 5 to 10 minutes for PHP to reload the file
Example settings:
- memory_limit = 256M
- max_execution_time = 30
- post_max_size = 50M
- upload_max_filesize = 50M
- date.timezone = "UTC"
- max_input_vars = 2000