How to set PHP directives using .user.ini
Let’s get started…
What are PHP directives?
PHP directives are the configuration settings used to control various behaviours of PHP functions on your site. This can include for example; the memory limit assigned for PHP, the maximum amount of time before a PHP process will time out and the maximum file-size that could be uploaded via a PHP script.
For sites hosted on LCN Web hosting packages, changes to PHP directives can be applied by uploading a file named .user.ini to the hosting web directory. Changes specified in this file will only apply to the individual site that the file is uploaded to.
How to create a .user.ini file
You can use a text editor like Notepad, Wordpad, or Textedit to create a .user.ini file. You can start with an empty text file, then add each PHP directive that you need to set for your site on a new line and save the file, entering the file name as: .user.ini.
Below are some examples of PHP directives you can add to the .user.ini:
How to upload your .user.ini file
After you’ve created a .user.ini file, you can upload it to the webspace for your domain using FTP.
For instructions on how to upload your file via FTP we have guide here
That’s it! You’ve created or edited and uploaded a .user.ini file to your website. The new settings should take effect on your site within five minutes.