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
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

FTP over SSL (FTPS)

Our Linux servers require SSL/TLS for FTP connections -- otherwise known as FTP over SSL. ...

Select PHP Version - Plesk

To select a version of PHP within the Plesk control panel, please do the following: Login in...

Which PHP versions do you support on shared hosting?

We currently support the following PHP versions on our shared hosting servers: 5.6 7.1 7.2...

Using multiple devices to check email

If you would like to check mail on our servers with a mail client (outlook thunderbird, etc) as...

SMTP Authentication via Scripts

Using SMTP authentication for your scripts, like you would with a mail client, is important for...