πŸ“„
Webhosting

Changing PHP upload_max_filesize: here’s how

πŸ“… 19 October 2026 ✏️ 19 October 2026 ⏱ 4 min leestijd

Can’t upload a file because the upload limit is too small? Here’s how to adjust upload_max_filesize and post_max_size in Plesk or via php.ini.

If you get an error message when uploading a file saying the file is too large, this is almost always due to the PHP setting upload_max_filesize. This value determines the maximum size of a file that can be uploaded via a web form or CMS. You can easily adjust this via Plesk or manually in php.ini, while also keeping an eye on a few related settings that would otherwise still cause problems.

Why uploading isn’t working

A failed upload with an error message like ‘file too large’ or a blank screen after uploading is usually caused by one of these three PHP values: upload_max_filesize, post_max_size, or memory_limit. If these are set too low, PHP rejects the file before your CMS or script can even process it. This often happens when uploading large images, videos, PDFs, or when importing a database via phpMyAdmin.

Adjusting upload_max_filesize in Plesk

With Plesk hosting, you don’t need to edit any files manually β€” you adjust the PHP settings via the interface.

1

Log in to Plesk

Open Plesk and go to the domain for which you want to adjust the upload limit.

2

Go to PHP Settings

Click ‘PHP settings’ (or ‘PHP Settings’) next to the domain to open the settings overview.

3

Adjust upload_max_filesize

Find the upload_max_filesize line and increase it to the desired value, for example 64M.

4

Adjust post_max_size

Set post_max_size to at least equal to or higher than upload_max_filesize, otherwise the upload will keep failing.

5

Save and test

Click ‘OK’ or ‘Apply’ and try uploading a file again right away.

πŸ’‘ Tip: Don’t increase the limit unnecessarily high. A very high value can, on a shared hosting plan, come at the expense of memory available for other processes.

Adjusting settings via php.ini

If you don’t have Plesk or want to adjust the setting manually, you can do this via the php.ini file or a .user.ini file in the root folder of your website.

1

Open the php.ini file

Look for php.ini via the file manager or FTP, or create a .user.ini file in the root folder if you don’t have access to php.ini.

2

Add the correct lines

Put the following lines in the file: upload_max_filesize = 64M and post_max_size = 64M.

3

Save the file

Save the file and upload it back to the correct folder if you were working via FTP.

4

Restart PHP if necessary

When using PHP-FPM, the PHP service sometimes needs to be restarted before the change takes effect.

Related settings you should also check

Besides upload_max_filesize and post_max_size, a few other settings also play a role in large uploads:

  • memory_limit: must be higher than post_max_size, otherwise PHP will still run out of memory.
  • max_execution_time: for large files or slow connections, the upload might otherwise be aborted due to a timeout.
  • max_input_time: the time PHP is given to process input data, including files.

If you use WordPress, a plugin or the theme itself may also set its own upload limit separate from PHP. In that case, also check the settings of your CMS itself.

πŸ’‘ Tip: You can always check the current values by uploading a small file with the content <?php phpinfo(); ?> and opening it in the browser.

Frequently asked questions

Why doesn’t my change work immediately?

Sometimes a change only takes effect after restarting PHP-FPM or after a few minutes of caching. Wait a moment and try again.

Can I increase the upload limit indefinitely?

No, the limit is often also bound by the maximum value allowed by your hosting plan. If in doubt, contact your hosting provider.

Does this setting also apply to email attachments?

No, email attachments are limited separately by your mail server, not by upload_max_filesize. Settings for business email are handled separately, for example via /nl/email-hosting/.

Conclusion

A failed upload is usually resolved within a few minutes by increasing upload_max_filesize and post_max_size, provided you also keep an eye on memory_limit and the execution time. With Plesk, you can manage this neatly via the PHP settings per domain, without manually editing files. If you’re unsure about the right settings for your plan, check the options via /nl/webhosting/ or ask via /nl/support/.

View web hosting β†’

Was dit artikel nuttig?