Video instructions for CWP File Manager
To upload a big file via File manager, we need to edit CWP PHP configuration.
First backup configuration file: /usr/local/cwp/php71/php.ini
cp /usr/local/cwp/php71/php.ini /usr/local/cwp/php71/php.ini.bak
Edit configuration file: /usr/local/cwp/php71/php.ini
Locate upload_max_filesize, post_max_size and memory_limit.
Change to your size, in this case we are using 500MB, please note that post_max_size and memory_limit need to be greater than upload_max_filesize
Example for 500MB File:
upload_max_filesize = 500M post_max_size = 550M memory_limit = 1024M max_input_time = 300 max_execution_time = 300
* Save the file /usr/local/cwp/php71/php.ini
Edit configuration file: /usr/local/cwpsrv/conf/cwpsrv.conf
Edit line client_max_body_size and set it to 550M
* Save the file and restart cwp
If you will be using File Manager for uploading big files over the cpanel subdomain like example cpanel.domain.com then you would need to edit all your webservers also:
Nginx (File: /etc/nginx/nginx.conf)
Apache (File: /usr/local/apache/conf/httpd.conf)
More Detailed Info
upload_max_filesize: By default this value is 64MB. We need to increase it to the maximum size of a single file that we want to upload.
post_max_size: It defines the maximum size of POST data that PHP will accept. This value should be greater than upload_max_filesize.
memory_limit: This sets the amount of memory a PHP script is allowed to use during its execution. Set this to a value greater than post_max_size so that PHP script can load and process the uploaded file.
max_input_time: This sets the maximum time in seconds a script is allowed to parse input data, like POST and GET. Timing begins at the moment PHP is invoked at the server and ends when execution begins. This would include populating $_FILES superglobal.
max_execution_time: The time a script is allowed to run after its input has been parsed. This would include any processing of the file itself.
Configure All user PHP versions on the server
If you need to configure all user PHP versions on the server: main PHP, PHP selector, PHP-FPM selector then you can use this script
Set Max upload file size to 128 MB
sh /scripts/php_big_file_upload 128
sh /scripts/php_big_file_upload 128 New Configuration: --------------------- upload_max_filesize = 128M post_max_size = 133M memory_limit = 152M max_input_time = 300 max_execution_time = 300 --------------------- Editing File: /opt/alt/php52/usr/php/php.ini Editing File: /opt/alt/php53/usr/php/php.ini Editing File: /opt/alt/php54/usr/php/php.ini Editing File: /opt/alt/php55/usr/php/php.ini Editing File: /opt/alt/php56/usr/php/php.ini Editing File: /opt/alt/php70/usr/php/php.ini Editing File: /opt/alt/php71/usr/php/php.ini Editing File: /opt/alt/php72/usr/php/php.ini Editing File: /opt/alt/php73/usr/php/php.ini Editing File: /opt/alt/php74/usr/php/php.ini Editing File: /opt/alt/php80/usr/php/php.ini Editing File: /opt/alt/php-fpm52/usr/php/php.ini Editing File: /opt/alt/php-fpm53/usr/php/php.ini Editing File: /opt/alt/php-fpm54/usr/php/php.ini Editing File: /opt/alt/php-fpm56/usr/php/php.ini Editing File: /opt/alt/php-fpm70/usr/php/php.ini Editing File: /opt/alt/php-fpm71/usr/php/php.ini Editing File: /opt/alt/php-fpm73/usr/php/php.ini Editing File: /usr/local/php/php.ini