How to set PHP directives using .php.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 .php.ini file
You can use a text editor like Notepad, Wordpad, or Textedit to create a .php.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: .php.ini.
Below are some examples of PHP directives you can add to the .php.ini:
How to upload your .php.ini file
After you’ve created a .php.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
Or you can use the File Manager as shown here.
That’s it! You’ve created or edited and uploaded a .php.ini file to your website. The new settings should take effect on your site within five minutes.