Knowledgebase Guide
Change the Maximum Upload File Size in php.ini and .htaccess
This guide explains how to increase the maximum upload file size used by WordPress and other PHP scripts by changing
upload_max_filesize and post_max_size.
.htaccess may not work on all PHP setups and can cause an error if unsupported.Maximum Upload File Size
There may be occasions when you need to increase the maximum upload file size. One of the most common reasons is when
WordPress themes, plugins or media files require a higher limit than the default setting in cPanel.
To make this change, you can usually adjust the setting from inside cPanel using the MultiPHP INI Editor.
Changing Upload Size Using php.ini
Using Basic Mode
- Log in to cPanel.
- Under the Software section, select MultiPHP INI Editor.
- Choose Basic Mode.
- Select the domain name you want to change.
- Update the values for post_max_size and upload_max_filesize.
- Click Save.
Using Editor Mode
- Log in to cPanel.
- Under the Software section, select MultiPHP INI Editor.
- Choose Editor Mode.
- Select the domain name you want to update.
- Add or update the following values:
upload_max_filesize = 256M
post_max_size = 256MReplace 256M with the upload size you need. For example, setting the value to 582M
would allow uploads up to 582MB, provided the account and server limits allow it.
post_max_size to the same value as, or higher than, upload_max_filesize.Editing Upload Size in .htaccess
Some hosting environments also allow PHP values to be changed inside the .htaccess file. This method is
not always supported, so if your website shows an error after adding the code, remove it and use the MultiPHP INI Editor instead.
- Log in to cPanel.
- Open File Manager.
- Go to your website folder, usually public_html.
- Open the .htaccess file.
- Add the following code:
php_value upload_max_filesize 256M
php_value post_max_size 256MAgain, replace 256M with the number of megabytes you want to allow.
Example
To set the maximum upload size to 582MB, you would use:
upload_max_filesize = 582M
post_max_size = 582MOr, if your server supports PHP values in .htaccess:
php_value upload_max_filesize 582M
php_value post_max_size 582MStill Having Problems?
If you are still having problems changing the maximum upload file size, please sign in to your hosting account and
open a support ticket. Our team will be happy to help.