PHP settings and the .user.ini file

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:

  1. Create a text file with the control panel's file manager and call it ".user.ini"  (ensure the file name begins with a period)
    1. 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.
  2. Add the PHP setting to a new line within the file.
    1. See examples below
  3. Save the file to the server within the directory where the PHP script is running at
    1. Normally, this will be your httpdocs, htdocs, or directory named after the domain
  4. 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
  • php, user.ini, settings, php.ini, directives
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to create a .htaccess file

Creating a .htaccess is easier then it sounds. You can create an .htaccess file in any text...

http Error codes

The following are http status and error codes that are returned for each file access via a web...

Frontpage Publishing via FTP

Frontpage extensions are not supported on our servers due to bugs in the extensions (some...

How to upload / create your site.

Creating your site How you create your site depends on what you want to do with it.  You...

Changing php.ini directives via .htaccess

A script you want to use requires a different setting then we have set?  No problem, you...