Spring Fresh Sale! - Up To 67% OFF BDIX Hosting + Free Domain
PHP

How to Fix the “upload_max_filesize Exceeded” Error

The "uploaded file exceeds the upload_max_filesize" error means the file you are uploading is larger than PHP's configured limit. Whether it is a big theme, a plugin, or a high-resolution image, the fix is to raise a couple of PHP settings — and it takes just a minute in cPanel.

The two settings that matter

  • upload_max_filesize — the biggest single file PHP will accept.
  • post_max_size — the biggest total request; it must be equal to or larger than upload_max_filesize.

Both need raising together, or the upload still fails.

Step 1: Open PHP settings

In cPanel, open Select PHP Version and click the Options tab (or use PHP settings in cPanel). You can also edit these in your php.ini file.

Step 2: Raise the limits

  1. Set upload_max_filesize to a value above your file — for example 64M.
  2. Set post_max_size to the same or higher — for example 64M or 128M.
  3. Save the changes.

If you upload very large files, you may also need to raise max_execution_time so the upload has time to complete.

WordPress users

WordPress shows its current limit under Media → Add New. After raising the PHP values, that figure updates. Our guide on increasing the maximum upload size in WordPress covers this specifically.

Frequently asked questions

I raised upload_max_filesize but it still won't upload.

Check that post_max_size is at least as large — it caps the whole request, so a small value blocks the upload even when the file limit is high. Raise both together.

How big should I set these?

Set them comfortably above your largest file, but not absurdly high. 64M or 128M suits most needs. Enormous uploads are better handled over SSH or FTP.

My upload starts then fails partway.

That is often a timeout on a large file. Raise max_execution_time too, or upload the file via FTP instead, which is not bound by PHP's upload limits.

Was this article helpful?