PHP upload limits control the size of files and complete form requests a website accepts. This guide explains how to set them on shared hosting using the configuration method your provider supports.

Confirm the supported method

Ask whether the website uses a custom php.ini, .user.ini or a control-panel PHP editor. Creating a file called php.ini in the website root does not work for every PHP handler. PHP-FPM/CGI setups may instead use .user.ini.

Back up the existing configuration before editing it.

Set the limits

Open the provider-approved configuration file in the correct directory, or its PHP editor, and add or update:

upload_max_filesize = 10M
post_max_size = 12M

This example limits one uploaded file to 10 MB and the whole POST request to 12 MB. Allow enough room for additional files and form fields. Check application, proxy and server limits too.

Verify the effective settings

Use the control panel’s PHP information or your application’s diagnostics, then test a permitted upload and one exceeding the intended limit. Configuration caching may delay .user.ini changes; follow the provider’s reload instructions.

Do not leave a public phpinfo() page on the website. It exposes server configuration. Increasing execution time is a separate decision and does not automatically change the upload limit.