WordPress Upload Error: Exceeds Maximum Upload Size

Notice Frequency: Common
Error message: The uploaded file exceeds the upload_max_filesize directive in php.ini

This 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

  1. PHP upload_max_filesize set too low (default 2MB on many hosts)
  2. PHP post_max_size smaller than the file being uploaded
  3. WordPress MAX_FILE_SIZE limit in Media settings
  4. Server-level upload limit (nginx client_max_body_size)
  5. Hosting provider limits (especially shared hosting)

How to Fix It

  1. In php.ini: Set upload_max_filesize = 64M and post_max_size = 64M
  2. In .htaccess (Apache): php_value upload_max_filesize 64M and php_value post_max_size 64M
  3. In wp-config.php: @ini_set('upload_max_filesize', '64M'); (doesn't always work)
  4. For nginx: Add client_max_body_size 64M; in the server or http block
  5. Contact your host if you can't change PHP settings u2014 many shared hosts have fixed limits

Frequently Asked Questions

How do I check my current upload limit?
Go to Media > Add New in your WordPress admin. The maximum upload file size is shown below the upload area. You can also check with wp-cli: wp eval 'echo size_format(wp_max_upload_size());'
What's a good upload limit for WordPress?
64MB is sufficient for most sites. If you regularly upload large videos, you might need 256MB or more, but consider using a video hosting service instead.
Get WordPress Performance Tips

Plugin reviews, speed optimization guides, and error debugging — straight to your inbox.

No spam. Unsubscribe anytime. We respect your privacy.