You are here: Home / kb / Buy Change the Maximum Upload File Size in php.ini and .htaccess

Change the Maximum Upload File Size in php.ini and .htaccess


Here we will look the various ways to change the maximum upload file size which is used by WordPress and other PHP scripts using upload_max_filesize and also post_max_size both in .htacess and php.ini:

Maximum Upload File Size


There may be occasions when you want to adjust the maximum upload file size. One of the of most common reasons clients ask us for this, is for WordPress themes and plugins which require a higher setting that the default in cPanel.

In order to make this change please do the following:

PHP.ini File


Using ‘Basic Mode’

 

  1. Under Software tab in cPanel select ‘MultiPHP INI editor’
  2. Choose ‘Basic Mode’ and then select your domain name
  3. Simply put your new values in for both post_max_size and upload_max_filesize and then click ‘Save’

 

You can also make the above changes using ‘Editor Mode’ as follows:

 

  1. Under Software tab in cPanel select ‘MultiPHP INI editor’
  2. Choose ‘Editor Mode’ and then select the domain name you wish to alter
  3. Add the following code:

php_value upload_max_filesize xxM

php_value post_max_size xxM


In the above example you simply replace ‘XX’ with the number of megabytes you wish to set it to. For example


php_value upload_max_filesize 582M


This would set the maximum upload size to 582MB.

Editing in .htaccess


If you would like to simply edit in .htaccess:

  1. Go to File Manager -à .htacess
  2. Add the following code:

php_value post_max_size XXM

php_value upload_max_filesize XX0M


In the above example you simply replace ‘XX’ with the number of megabytes you wish to set it to. For example


php_value upload_max_filesize 582M


Both of the above methods will work to adjust the maximum upload file size.

If you are still having problems then please sign in to your hosting account and open a support ticket.

Call Now Button