Changing the PHP upload_max_filesize limit with CloudLinux in Plesk

upload_max_filesize sets the maximum size of an individual uploaded file accepted by PHP. The complete upload path also depends on the request-size limit, temporary storage, application settings and any web server or proxy limit.

Prepare for the change

Check the size and type of the file, your available disk space and the application's own upload policy. Back up important data before using a large import file. Prefer the application's supported CLI or staged import process when browser uploads are unsuitable.

01 Change the setting

  1. In Plesk, select the correct subscription and open PHP Selector from the available sidebar or additional tools. This guide applies to Linux subscriptions where the CloudLinux integration is installed. Windows Plesk uses its own PHP configuration.
  2. Check the active PHP version and which websites the selector change will affect. Plesk also has a native PHP Settings page for each domain. A CloudLinux setting will not automatically override a different Plesk PHP handler. Confirm which handler serves the website first.
  3. Open Options and locate upload_max_filesize. Choose the required value within your service's limits and save.
  4. Set post_max_size high enough for the whole request, including all files and form overhead. For example, a permitted 32 MB file needs a request allowance greater than 32 MB. These are examples, not plan allowances.
  5. Check application-level limits, then upload a small test file and a representative larger file. Use non-sensitive test material and remove it afterward.

Confirm the expected result

Confirm that the application reports the expected permitted size and that the upload reaches its destination intact. Compare the saved file size with the source and test that the application can open or process it.

Why can an upload still fail after I raise upload_max_filesize?

An HTTP 413 response can come from a web server, proxy or CDN before PHP receives the request. Empty form data can indicate a request larger than post_max_size. Check temporary storage, timeout and quota errors before increasing values again. Ask support about restrictions that are not exposed to your account.

  • 0 Users Found This Useful
  • plesk, development
Was this answer helpful?

Related Articles

Changing the PHP post_max_size limit with CloudLinux in Plesk

post_max_size limits the size of the entire HTTP POST body received by PHP. It includes...

Configuring PHP error display and logging with CloudLinux in Plesk

PHP errors are useful for diagnosis, but displaying them on a public site can expose filesystem...

Managing PHP extensions with CloudLinux in Plesk

Extensions add capabilities such as database access, multibyte text handling, image processing...

Adjusting the PHP memory limit with CloudLinux in Plesk

memory_limit limits memory available to an individual PHP script. Increasing it can help a...

Enabling the Mailparse extension with CloudLinux in Plesk

Mailparse helps PHP software inspect MIME email messages and attachments. A helpdesk, mail...