Troubleshooting

Fix file upload size errors on cPanel (upload_max_filesize, 413)

Fix 'file exceeds upload_max_filesize', 413 Request Entity Too Large and failed uploads on cPanel by raising PHP limits correctly, or using FTP for very large files.

BeginnercPanel hosting2 min read

Uploading a large theme, video, backup or database file through a website or phpMyAdmin often fails with a size error. The limit usually comes from PHP settings, which you can change yourself in cPanel. For really big files, a different upload method is the better fix.

Before you start

  • Note the exact message and where it appears (WordPress, phpMyAdmin, a form, File Manager).
  • Know the file size you need to upload.

Recognise the error

MessageCause
The uploaded file exceeds the upload_max_filesize directive in php.iniPHP's per-file limit
Maximum upload file size: 2 MB (WordPress media screen)Same limit, shown by WordPress
413 Request Entity Too LargeThe request is larger than the web server or proxy accepts
Upload stops without error, page reloads emptypost_max_size exceeded, so PHP drops the whole request
Upload starts, then times outmax_execution_time / max_input_time too low, or slow connection

Raise the PHP limits

  1. Open cPanel → Software → Select PHP Version → Options (CloudLinux), or cPanel → Software → MultiPHP INI Editor for domains on EasyApache PHP. See Select PHP Version and MultiPHP INI Editor.
  2. Set the values, keeping post_max_size at least as large as upload_max_filesize:
    • upload_max_filesize: e.g. 128M
    • post_max_size: e.g. 130M
    • max_execution_time: 300
    • max_input_time: 300
    • memory_limit: 256M
  3. Save (changes apply within seconds) and reload the upload page; the displayed maximum should change.

Note: Lines like php_value upload_max_filesize 128M in .htaccess do not work with LSAPI or PHP-FPM and can cause a 500 error. Use the cPanel tools instead.

Check which tool applies

If changes in one tool have no effect, the domain uses the other PHP handler. A domain set to inherit or an alt-php version in MultiPHP Manager follows Select PHP Version; an ea-php version follows the MultiPHP INI Editor. Confirm with a temporary phpinfo() file (delete it afterwards).

For very large files, skip the browser

  • Upload by FTP/SFTP with FileZilla; FTP has no PHP size limit and can resume.
  • For a big database, upload the .sql.gz by FTP and import it in Terminal: gunzip < dump.sql.gz | mysql -u cpuser_user -p cpuser_db.
  • For WordPress media, upload files by FTP into wp-content/uploads and register them with a media import plugin, or use WP-CLI wp media import.

Troubleshooting

  • 413 persists after raising PHP limits: a CDN or proxy in front of the site has its own limit (some free CDN plans cap uploads around 100 MB). Upload via the server hostname or FTP.
  • Limit seems capped: values above what your plan allows are ignored; contact support if you need more.
  • Upload blocked as malware: see uploads blocked by Imunify360.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.