PHP Maximum Upload File-size Increase

PHP Maximum Upload File-size Increase

PHP upload limit is a PHP configuration setting that specifies the maximum size of a file that can be uploaded to a server with Website / WordPress. PHP uses this setting to limit the size of uploaded files and prevent the server from running out of memory or disk space. The filesize values, input time, and memory limit settings are expressed in bytes. Still, it can also be defined in megabytes or gigabytes by appending the letter M or G, respectively.

PHP limit can be increased per the script, WordPress plugin and theme requirement. Navigate to the section, cPanel > File Manager > Click on the directory or folder where your website is located > You will see the file named .htaccess > Right-click on it and click on Edit > Then save the following code anywhere:

php_value memory_limit 256M
php_value upload_max_filesize 256M
php_value post_max_size 128M
php_value max_execution_time 300
php_value max_input_vars 2000
php_value max_input_time 1000

When updating the PHP limit, you must take into consideration other directives-

  • post_max_size, which must be larger than upload_max_filesize.
  • memory_limit, which should be larger than post_max_size.
  1. For example, if the “upload_max_filesize” is set to 256M, the maximum size of a file that can be uploaded is 256 megabytes. If you upload a file larger than this limit, you will receive an error message indicating that the file is too large.
  2. You can change the values ​​like memory limit, input time, execution time, etc., as needed.
  3. If the .htaccess file is hidden, Once in the File Manager, You can check if hidden files are enabled in Settings ( upper right corner )
  4. But if it doesn’t show the .htaccess file, there is no .htaccess file. Create a new file called .htaccess

 

HN6

Our ethos outlines the one goal we strive for—to offer super-fast hosting alongside expert technical support, all at affordable, sustainable prices. We are here for the long term, fostering customer relationships that last a lifetime. We have already hosted more than 95000 websites for happy customers in 20 countries around the globe.

Help

©2019-2024 Host Nil• Corp  LTD. All Rights Reserved.

Untitled design