How to create a .user.ini to make custom PHP changes:
Mostly for many reasons we have to set custom values to our websites for making changes such as increasing the memory limit, upload limit etc. Since these are settings that we can not change on a server-wide basis, we would need to make these changes locally on the account. In such case we can use a .user.ini file with customized values. For creating that follow the steps below,
Login to cPanel and navigate to File Manager and browse public_html (also ensure that “hidden files” are visible).
Now click the “New File” link at the top of the page to access the tool to create your new .user.ini file
You will now see a popup allowing you to name and configure the new file. In the “New File Name” box, add the text“.user.ini” (without quotes). Be sure to include the dot before “user” in the filename.
Now, the .user.ini file has been created. The next step is to edit the file and add the lines that you would like to customize. Locate the file in the list and click on it to highlight it.
Once the .user.ini file has been highlighted, click the “Edit” link at the top of the page. This will then open up the file editor so you can input your custom configuration settings. Since we’ve just created the .user.ini file, it will be blank. All you would need to do is add the line from the server-wide php.ini file you wish to change and the new value.
Below are some of the most common lines that are altered when making custom PHP changes,
memory_limit upload_max_filesize post_max_size max_execution_time max_input_time register_globals magic_quotes_gpc
After changing the value save the file. That’s all…….
If you need our help to fix any issues on your server. Please feel free to contact us, simply email to [email protected]
Monthly server support with Unlimited tickets, 24×7 monitoring, Security Audit and lot more for just $59