<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Control WebPanel Wiki &#187; Big file upload</title>
	<atom:link href="https://wiki.centos-webpanel.com/tag/big-file-upload/feed" rel="self" type="application/rss+xml" />
	<link>https://wiki.centos-webpanel.com</link>
	<description>CentOS WebPanel Wiki</description>
	<lastBuildDate>Wed, 12 Feb 2025 20:38:16 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.1</generator>
	<item>
		<title>Big file upload via File Manager</title>
		<link>https://wiki.centos-webpanel.com/big-file-upload-via-file-manager</link>
		<comments>https://wiki.centos-webpanel.com/big-file-upload-via-file-manager#comments</comments>
		<pubDate>Wed, 27 Mar 2019 13:00:53 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[User-Panel]]></category>
		<category><![CDATA[Big file upload]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1118</guid>
		<description><![CDATA[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 nano /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 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><strong>Video instructions for CWP File Manager</strong></p>
<p><object width="700" height="425"><param name="movie" value="https://www.youtube.com/v/QW4Rr_3bVBU?version=3&amp;showinfo=0&amp;theme=light&amp;fs=1&amp;rel=0&amp;iv_load_policy=3&amp;modestbranding=1"></param><param name="allowScriptAccess" value="always"></param><param name="allowFullScreen" value="true"></param><embed src="https://www.youtube.com/v/QW4Rr_3bVBU?version=3&amp;showinfo=0&amp;theme=light&amp;fs=1&amp;rel=0&amp;iv_load_policy=3&amp;modestbranding=1" type="application/x-shockwave-flash" allowScriptAccess="always" allowfullscreen="true" width="700" height="425"></embed></object></p>
<p>To upload a big file via File manager, we need to edit CWP PHP configuration.</p>
<p>First backup configuration file:  /usr/local/cwp/php71/php.ini </p>
<pre>cp /usr/local/cwp/php71/php.ini /usr/local/cwp/php71/php.ini.bak</pre>
<p><strong>Edit configuration file:</strong> /usr/local/cwp/php71/php.ini</p>
<pre>nano /usr/local/cwp/php71/php.ini</pre>
<p>Locate <strong>upload_max_filesize</strong>, <strong>post_max_size </strong>and <strong>memory_limit</strong>.<br />
Change to your size, in this case we are using 500MB, please note that <strong>post_max_size</strong> and <strong>memory_limit</strong> need to be greater than <strong>upload_max_filesize</strong></p>
<p>Example for 500MB File:</p>
<pre>
upload_max_filesize = 500M
post_max_size = 550M
memory_limit = 1024M
max_input_time = 300
max_execution_time = 300</pre>
<p>* Save the file /usr/local/cwp/php71/php.ini</p>
<p><strong>Edit configuration file:</strong> /usr/local/cwpsrv/conf/cwpsrv.conf</p>
<pre>nano /usr/local/cwpsrv/conf/cwpsrv.conf</pre>
<p>Edit line <strong>client_max_body_size</strong> and set it to 550M</p>
<pre>client_max_body_size 550M;</pre>
<p>* Save the file and restart cwp</p>
<pre>sh /scripts/restart_cwpsrv</pre>
<h1>cpanel subdomain</h1>
<p>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:</p>
<p><strong>Nginx</strong> (File: /etc/nginx/nginx.conf)<br />
client_max_body_size 550M;</p>
<p><strong>Apache</strong> (File: /usr/local/apache/conf/httpd.conf)<br />
LimitRequestBody 504857600</p>
<h1>More Detailed Info</h1>
<p><strong>upload_max_filesize</strong>: By default this value is 64MB. We need to increase it to the maximum size of a single file that we want to upload.</p>
<p><strong>post_max_size</strong>: It defines the maximum size of POST data that PHP will accept. This value should be greater than <strong>upload_max_filesize</strong>.</p>
<p><strong>memory_limit</strong>: This sets the amount of memory a PHP script is allowed to use during its execution. Set this to a value greater <strong>than post_max_size</strong> so that PHP script can load and process the uploaded file.</p>
<p><strong>max_input_time</strong>: 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.</p>
<p><strong>max_execution_time</strong>: The time a script is allowed to run after its input has been parsed. This would include any processing of the file itself.</p>
<h1>Configure All user PHP versions on the server</h1>
<p>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</p>
<p>Set Max upload file size to 128 MB</p>
<pre>sh /scripts/php_big_file_upload 128</pre>
<p>Example output:</p>
<pre>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</pre>
<p>You can also use <strong>all</strong> flag to configure all services, example for 512Mb</p>
<pre>sh /scripts/php_big_file_upload 512 all</pre>
<p>It will configure: Nginx, Apache, CWP and PHP versions on the server<br />
<em>Note: For php-fpm you need to restart each version</em></p>
]]></content:encoded>
			<wfw:commentRss>https://wiki.centos-webpanel.com/big-file-upload-via-file-manager/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
