Upload fails with "exceeds the upload_max_filesize" error
On this page
Symptoms
- WordPress says "The uploaded file exceeds the upload_max_filesize directive in php.ini."
- The media library shows a Maximum upload file size that is too small for your file.
- A form or plugin upload stops without a message, or a theme or plugin ZIP cannot be installed.
- An import tool says the file is too large.
Causes
- The PHP upload limit is too low (
upload_max_filesize). - The POST limit is lower than the file (
post_max_size). It must be at least as large as the upload limit. - The script runs out of time while it processes a large file (
max_execution_time,max_input_time). - The account's disk space is full.
Fix
Raise the upload and POST limits
- Log in to the control panel (
https://<server>:2083). - Open PHP (section Advanced).
- Under PHP settings, set Max upload size (MB) to the size you need, for example
256. - Set Max POST size (MB) to the same value or more.
- Click Save settings.
For very large files, click the Large uploads ready-made button (1024 MB, 30 minutes) and then Save settings. The maximum for both fields is 2048 MB. See all PHP settings.
Give the script more time
On the same page, raise Max execution time (seconds) and Max input time (seconds), for example to 300, and click Save settings.
Free disk space
Check Resource Usage (section Advanced) or Disk Usage (section Files). If the account is full, delete old backups or archives, or ask for a larger plan.
Still not working?
- Upload the file another way: the File Manager and FTP/SFTP do not depend on your website's PHP limits. In WordPress, you can then add the file with an "add from server" plugin, or install a theme or plugin by extracting its ZIP into
wp-content/themesorwp-content/plugins. - Reload the page that shows the limit: the new values apply from the next request.
- A
php_value upload_max_filesizeline in the website's.htaccessis overridden by the values on the PHP page, so set the value there.
Thank you — this helps us improve the article.
Still stuck?
Ask the AI about your exact situation — it answers from this knowledge base — or contact us.
Related articles
- How to change PHP settings like memory_limit and upload size
Raise memory_limit, upload_max_filesize, post_max_size, max_execution_time or max_input_vars in the PHP page, with allowed ranges and ready-made presets.
- How to upload files to your website with the File Manager
Upload website files from your browser with the File Manager, replace existing files, and know where your site's files go (public_html).
- FTP and SFTP connection settings (ports, FTPS, FileZilla)
The server, port, username and encryption to connect with FileZilla, WinSCP or Cyberduck over FTP with TLS (port 21) or SFTP (port 22).