I am trying to upload a 762KB picture using the multi-file uploader at /wp-admin/media-new.php. This page reports that my maximum upload filesize is 2GB.

However, once the upload progress bar gets to 100%, the upload fails with

The uploaded file exceeds the upload_max_filesize directive in php.ini.

I am aware of how to set my upload_max_filesize and associated variables in php.ini, but that appears to be correct. What else could be causing this?

Other potentially useful information:

  • post_max_size is 3G
  • max_execution_time is 600
  • memory_limit is 256M
  • The site is hosted on Dreamhost (shared hosting, unlimited storage).

My .phprc:

upload_max_filesize = 2GB
post_max_size = 3G
max_execution_time = 600
memory_limit = 512M
max_input_time = 500
  • You say the site is on Dreamhost, but you also seem to indicate that you have access to php.ini. Is it Dreamhost shared hosting, or do you have a VPS set up?
    – Pat J
    Sep 23, 2013 at 14:35
  • Shared hosting, so it's technically going through .phprc. However, phpinfo() on the page reports all of the above values as I expect.
    – Tanis.7x
    Sep 23, 2013 at 14:37
  • Yeah, I just checked my own DH site's settings, and my upload_max_filesize is 7M. Lots of room for a 762KB file. Are you low on disk space?
    – Pat J
    Sep 23, 2013 at 14:39
  • Nope. More than ample space.
    – Tanis.7x
    Sep 23, 2013 at 14:41

2 Answers 2


Apparently there's an upload_size_limit filter in WordPress. To check what your site's upload limit is set to, add this to your theme's functions.php:

add_action( 'shutdown', 'wpse115322_upload_sizes', 99 );
function wpse115322_upload_sizes() {
    $size = wp_max_upload_size();
    $kb = $size/1024;
    $mb = $size/(1024*1024);
    echo( "$kb KB / $mb MB<br />\n" );

That'll print your site's actual max file size at the bottom of every page. If it's less than you anticipated, it could be that a plugin or your theme has set it low. Try disabling all plugins, then turn them on one by one till you find the culprit. If it's not a plugin, try switching to a default theme (Twenty Ten/Eleven/Twelve/Thirteen).


wp_max_upload_size() (The filter upload_size_limit is mentioned in the source)

  • I am seeing 2097152 KB / 2048 MB, so it is what I expect (and far above the 762KB size of the file).
    – Tanis.7x
    Sep 23, 2013 at 15:03
  • Curiouser and curiouser. Have you tried disabling plugins?
    – Pat J
    Sep 23, 2013 at 15:04
  • I'm going through them right now- so far I have not made any progress.
    – Tanis.7x
    Sep 23, 2013 at 15:09
  • Update- disabling all plugins and switching to Twenty Twelve did not solve the issue.
    – Tanis.7x
    Sep 23, 2013 at 15:12
  • If you create another WP install in your Dreamhost account, do you have the same problem? Also, I'm starting to wonder if it's a problem with file/directory permissions.
    – Pat J
    Sep 23, 2013 at 15:14

It was a simple typo in my phprc.

upload_max_filesize should be 2G, not 2GB.

It's interesting that WordPress and PHP/phpinfo() still picked it up and claimed the limit should be 2GB, though it makes perfect sense as to why uploads weren't working correctly.

  • When you can, please accept your answer as the correct one. That way, if someone else has this problem, they can benefit from your experience.
    – Pat J
    Sep 23, 2013 at 20:07
  • Will do! Just need to wait the 2 days.
    – Tanis.7x
    Sep 23, 2013 at 20:10
  • Also, I'm glad you got it resolved.
    – Pat J
    Sep 23, 2013 at 20:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.