• I have local installations of WP on two separate Macs, both running MacOS Sierra (laptop and desktop). Both of them are limiting my uploads to 1MB. PhpInfo() says that upload_max_filesize=48M, post_max_size=48M, and memory_limit=128M. I am able to upload large files to other test site that are also on localhost with no problem. I thought that WP might be accessing another php, so I called ‘echo phpinfo()’ from wp-blog-header.php, which said that I did have a 48M limit. I’ve tried checking variables with file_put_contents() but I can’t find where the limit is being throttled.

    I’ve also tried changing themes but that doesn’t help either. Is there something I’m missing?

    Thanks,
    Chris

Viewing 9 replies - 1 through 9 (of 9 total)
  • Have you tried editing php.ini file?

    Add these in your php.ini file.

    upload_max_filesize = 48M
    post_max_size = 48M

    Alternatively, you can try adding these lines in .htaccess file:

    php_value upload_max_filesize 48M
    php_value post_max_size 48M 

    Don’t forget to restart your server.

    • This reply was modified 7 years, 5 months ago by Wilgax.
    Thread Starter cfschulte373

    (@cfschulte373)

    Thanks for the reply.

    Yes, I did edit php.ini. That’s why phpinfo() says upload_max_filesize=48M. I’ve been creating and maintaining websites for a while, but this is the first time I’ve used WP.

    This is getting reset somewhere after the site loads but I can’t figure out where.

    ..

    • This reply was modified 7 years, 5 months ago by ThemeSumo. Reason: posted in error
    Thread Starter cfschulte373

    (@cfschulte373)

    Thanks. I’ve tried that. Just did it again just to see if anything changed.

    I’ve also tried adding this to the functions.php in my active theme:
    @ini_set( ‘upload_max_size’ , ’48M’ );
    @ini_set( ‘post_max_size’, ’48M’);
    @ini_set( ‘max_execution_time’, ‘300’ );

    to the functions.php in my active theme.

    It looks like the variables are set correctly, but they are somehow being overridden. Is there a security feature that needs to be turned off?

    I have the same problem. See

    Support » Plugins and Hacks » NextCellent Gallery – NextGEN Legacy » Max upload size and loss of hair
    Max upload size and loss of hair.

    This is on version 4.6.1 PHP 5.5.38

    Thread Starter cfschulte373

    (@cfschulte373)

    Thanks weaversp. At least I’m not alone here. I don’t have NextCellent Gallery, but the overridden settings looks very similar.

    Hi cfschulte373. The only thing I haven’t tried is downloading a previous version of WordPress. I’m in a slightly enviable position of having a whole 2m download limit.

    Hi. Solved on this side of the pond. We copied the php.ini file to the highest level we could ie before wp-admin, wp-content and wp-includes.

    Thread Starter cfschulte373

    (@cfschulte373)

    Doh! I found my problem. It turns out that the restriction didn’t start until after I set WP_ALLOW_MULTISITE to true. The Network Admin Settings page is quite a bit different than the individual sites’ settings page. There are two settings there, “Site upload space” (MB) and “Max upload file size” (KB) that are set by default to 100 and 1500 respectively. I reset those and everything works fine.

    I finally figured it out by tracking down variables until I found the setting, upload_space_check_disabled.

    Thanks to everyone for your suggestions!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘WP: Maximum upload size: 1 MB but phpinfo says upload_max_filesize 48M?’ is closed to new replies.