In this guide, we’ll explore different methods to adjust the maximum upload file size for WordPress and other PHP applications. This involves modifying the upload_max_filesize and post_max_size settings in both the php.ini file and the .htaccess file.
When to Adjust Maximum Upload File Size
You might need to increase the maximum upload file size for various reasons, especially when installing WordPress themes and plugins that require larger file sizes than the default settings in cPanel.
Adjusting in php.ini
Using Basic Mode:
- In cPanel, navigate to the Software tab and select MultiPHP INI Editor.
- Choose Basic Mode and select your domain.
- Enter your desired values for both
post_max_sizeandupload_max_filesize, then click Save.
Using Editor Mode:
-
In cPanel, go to the Software tab and select MultiPHP INI Editor.
-
Switch to Editor Mode and select the domain you wish to modify.
-
Add the following lines, replacing
XXwith your desired megabyte value:php_value upload_max_filesize XXM php_value post_max_size XXMFor example:
php_value upload_max_filesize 582M
This sets the maximum upload size to 582MB.
Editing in .htaccess
If you prefer to modify the .htaccess file directly, follow these steps:
-
Go to File Manager and locate the
.htaccessfile. -
Add the following lines, again replacing
XXwith your chosen value:php_value post_max_size XXM php_value upload_max_filesize XXMFor example:
php_value upload_max_filesize 582M
Conclusion
Both methods above will effectively adjust the maximum upload file size. If you continue to experience issues, please log in to your hosting account and submit a support ticket for assistance.