PHP upload settings limit individual files and the complete form request sent to a website. This guide explains how to adjust those settings and verify the effective limit.
Choose the supported configuration method
Back up existing configuration and check your provider’s PHP handler. Use its PHP editor or approved php.ini/.user.ini file where applicable:
upload_max_filesize = 20M
post_max_size = 24MThe complete request needs room for additional fields or files, so its limit should exceed the individual file limit. Other application, proxy and web-server limits can still apply.
Use htaccess only with a compatible handler
If the provider confirms that Apache’s PHP module accepts php_value directives, the equivalent .htaccess settings are:
php_value upload_max_filesize 20M
php_value post_max_size 24MThese directives are not suitable for every PHP handler. With PHP-FPM or CGI they can cause server errors. Do not add them as a fallback without checking compatibility.
Verify the change
Check the effective PHP values through the control panel or application diagnostics and test uploads below and above the intended limit. Allow for configuration caching or the provider’s required reload procedure.
If you temporarily use a phpinfo() page, restrict access and delete it immediately after checking. Restore the backed-up configuration if the site returns errors.