{"id":800,"date":"2024-06-19T18:51:21","date_gmt":"2024-06-19T18:51:21","guid":{"rendered":"https:\/\/zalvis.com\/docs\/?p=800"},"modified":"2024-06-19T18:51:21","modified_gmt":"2024-06-19T18:51:21","slug":"maximum-upload-filesize-and-how-to-increase-it","status":"publish","type":"post","link":"https:\/\/zalvis.com\/docs\/maximum-upload-filesize-and-how-to-increase-it.html","title":{"rendered":"Maximum Upload Filesize and how to Increase it"},"content":{"rendered":"<p>What Is \u201cupload_max_filesize\u201d?<\/p>\n<p>&#8220;upload_max_filesize&#8221; is a PHP configuration setting that specifies the maximum size of a file that can be uploaded to a server. This setting is used by PHP to limit the size of uploaded files to prevent the server from running out of memory or disk space. The value of the &#8220;upload_max_filesize&#8221; setting is expressed in bytes, but can also be defined in megabytes or gigabytes by appending the letter <strong>M<\/strong> or <strong>G<\/strong>respectively.<\/p>\n<p>When updating upload_max_filesize, you must put into consideration other directives<\/p>\n<ul>\n<li>post_max_size, which must be larger than upload_max_filesize.<\/li>\n<li>memory_limit, which should be larger than post_max_size.<\/li>\n<\/ul>\n<p>For example, if the &#8220;upload_max_filesize&#8221; is set to 128M, it means that the maximum size of a file that can be uploaded is 128 megabytes. If you upload a file that is larger than this limit, you will receive an error message indicating that the file is too large.<\/p>\n<p>To increase the upload max filesize on cPanel, you can follow these steps:<\/p>\n<ul>\n<li>Login to your cPanel account<\/li>\n<li>Go to the <strong>Software<\/strong> section and click on <strong>Selecet PHP Version<\/strong><\/li>\n<li>Find the <strong>upload_max_filesize<\/strong> option and increase its value to the desired value (e.g. 64M)<\/li>\n<li>Click on the <strong>Apply<\/strong> button to save the changes.<\/li>\n<\/ul>\n<p>For the new change to be reflected, this value should be at least as big as the post_max_size.<br \/>\nYou can also increase the upload max filesize by adding the following code to your .htaccess file:<\/p>\n<blockquote><p>php_value upload_max_filesize 64M<\/p><\/blockquote>\n<p>It is important to set the &#8220;upload_max_filesize&#8221; value appropriately to ensure that your server can handle the size of uploaded files without running into performance or stability issues.<\/p>\n<div class=\"qwatv69e0c6cc300ce\" >If you enjoyed this article, then you\u2019ll love Zalvis's Cloud Hosting platform. Turbocharge your website and get 24\/7 support from our veteran team. Our world-class hosting infrastructure focuses on auto-scaling, performance, and security. Let us show you the Zalvis difference! <a href=\"https:\/\/zalvis.com\/\">Check out our services.<\/a><\/div><style type=\"text\/css\">\r\n@media screen and (min-width: 1201px) {\r\n.qwatv69e0c6cc300ce {\r\ndisplay: block;\r\n}\r\n}\r\n@media screen and (min-width: 993px) and (max-width: 1200px) {\r\n.qwatv69e0c6cc300ce {\r\ndisplay: block;\r\n}\r\n}\r\n@media screen and (min-width: 769px) and (max-width: 992px) {\r\n.qwatv69e0c6cc300ce {\r\ndisplay: block;\r\n}\r\n}\r\n@media screen and (min-width: 768px) and (max-width: 768px) {\r\n.qwatv69e0c6cc300ce {\r\ndisplay: block;\r\n}\r\n}\r\n@media screen and (max-width: 767px) {\r\n.qwatv69e0c6cc300ce {\r\ndisplay: block;\r\n}\r\n}\r\n<\/style>\r\n","protected":false},"excerpt":{"rendered":"<p>What Is \u201cupload_max_filesize\u201d? &#8220;upload_max_filesize&#8221; is a PHP configuration setting that specifies the maximum size of a file that can be uploaded to a server. This setting is used by PHP to limit the size of uploaded files to prevent the server from running out of memory or disk space. The value of the &#8220;upload_max_filesize&#8221; setting [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-800","post","type-post","status-publish","format-standard","hentry","category-cpanel-hosting"],"_links":{"self":[{"href":"https:\/\/zalvis.com\/docs\/wp-json\/wp\/v2\/posts\/800","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zalvis.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zalvis.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zalvis.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zalvis.com\/docs\/wp-json\/wp\/v2\/comments?post=800"}],"version-history":[{"count":2,"href":"https:\/\/zalvis.com\/docs\/wp-json\/wp\/v2\/posts\/800\/revisions"}],"predecessor-version":[{"id":802,"href":"https:\/\/zalvis.com\/docs\/wp-json\/wp\/v2\/posts\/800\/revisions\/802"}],"wp:attachment":[{"href":"https:\/\/zalvis.com\/docs\/wp-json\/wp\/v2\/media?parent=800"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zalvis.com\/docs\/wp-json\/wp\/v2\/categories?post=800"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zalvis.com\/docs\/wp-json\/wp\/v2\/tags?post=800"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}