WordPress Upload Error: Exceeds Maximum Upload Size

Error message:
The uploaded file exceeds the upload_max_filesize directive in php.iniThis error occurs when you try to upload a file larger than the server’s configured maximum. WordPress shows the current limit on the Media > Add New page.
Common Causes
- PHP upload_max_filesize set too low (default 2MB on many hosts)
- PHP post_max_size smaller than the file being uploaded
- WordPress MAX_FILE_SIZE limit in Media settings
- Server-level upload limit (nginx client_max_body_size)
- Hosting provider limits (especially shared hosting)
How to Fix It
- In php.ini: Set
upload_max_filesize = 64Mandpost_max_size = 64M - In .htaccess (Apache):
php_value upload_max_filesize 64Mandphp_value post_max_size 64M - In wp-config.php:
@ini_set('upload_max_filesize', '64M');(doesn't always work) - For nginx: Add
client_max_body_size 64M;in the server or http block - Contact your host if you can't change PHP settings u2014 many shared hosts have fixed limits
⚡
Diagnosing WordPress errors?
WP Multitool helps you find and fix performance issues, slow queries, and plugin conflicts without guesswork.
Get WordPress Performance Tips
Plugin reviews, speed optimization guides, and error debugging — straight to your inbox.
No spam. Unsubscribe anytime. We respect your privacy.