Linux hosting: How to Increase the upload_max_filesize Limit in cPanel
There are specific scenarios when you may be asked to change your PHP configuration. Specifically, you may be directed to edit a file on your server called php.ini and to increase the upload_max_filesize limit.
What is the upload_max_filesize PHP setting?
upload_max_filesize is a setting managed through the PHP Options, which sets the maximum size of each file, uploaded using a PHP script.
How to Increase the upload_max_filesize Limit in cPanel
All IndicHosts.net customers should see the Select PHP Version section in their hosting account’s cPanel. The PHP Selector is omitted by default in cPanel and might be missing from your account if you are hosting with a different web host. In such cases, skip to MultiPHP INI Editor method
We do not allow direct changes to PHP.ini on our servers. However, PHP configuration changes can be made from cPanel by following these steps:
Procedure
- Log into cPanel
- Navigate to "WHM / Software / Select a PHP Version"
- Ensure the hosted domain uses a version of alt-PHP
- Click on the Options link/tab
- Here you can locate the upload_max_filesize and click on the value.
A dropdown menu or text input box will appear, allowing you to change the value as required. Check your script, plugin, or theme’s documentation (or an on-screen error message) to find the correct value.
IMP: For the new change to be reflected, this value should be at least as big as the post_max_size.
- Increase the following variables
- upload_max_filesize
- post_max_size (This should be larger than or equal to upload_max_filesize)
- memory_limit (This should be larger than or equal to post_max_size)
- max_execution_time (Optional, but can prevent timeout errors for large files)
- Once you make any changes, please do a left-hand side click anywhere outside the dropdown or text input box. If the change was successful, you will see a green box with a message confirming that the change has been applied.
Increase the upload_max_filesize Limit in cPanel using the default MultiPHP INI Editor
Procedure
- Log into cPanel
- Navigate to "WHM / Software / MultiPHP INI Editor"
- Select the version of PHP that your site uses
- Increase the following variables
- upload_max_filesize
- post_max_size (This should be larger than or equal to upload_max_filesize)
- memory_limit (This should be larger than or equal to post_max_size)
- max_execution_time (Optional, but can prevent timeout errors for large files)
- Click "Apply"
- Repeat for all versions of PHP that you require larger file upload sizes for.
Please note, the maximum size for these variables is 2GB.