• Resolved Jirka283

    (@jirka283)


    Hi there, I do have problem with uploading my images bigger than 2MB. Getting http error. Cant find out when it exactly happened, suspecting automatic install WP updates. Site info:
    Server architecture Linux 5.0.0-20-generic x86_64
    Web server nginx/1.15.9
    PHP version 7.3.6-1+ubuntu19.04.1+deb.sury.org+1 (Supports 64bit values)
    PHP SAPI fpm-fcgi
    PHP max input variables 1000
    PHP time limit 300
    PHP memory limit 1024M
    Max input time 600
    Upload max filesize 256M
    PHP post max size 256M
    cURL version 7.64.0 OpenSSL/1.1.1b
    Is SUHOSIN installed? No
    Is the Imagick library available? Yes

    tried to disable Imagick, add limit in to wp config file. When gouing to upload file I see, that max upload size is 256, but getting that http error. Any ideas what Im missing?

Viewing 5 replies - 1 through 5 (of 5 total)
  • @ini_set( ‘upload_max_size’ , ‘256M’ );
    @ini_set( ‘post_max_size’, ‘256M’);
    @ini_set( ‘max_execution_time’, ‘3000’ );

    check above configuration in following files
    function.php
    wp-config.php File
    php.ini Option
    .htaccess file
    you can use Increase Max Upload Filesize plugin

    Thread Starter Jirka283

    (@jirka283)

    https://www.hostinger.com/tutorials/http-error-when-uploading-images-to-wordpress

    Ok, forgot to mention, updating theme, changing theme, disable all plugins,making GD library default image editor, running on nginx dont have .htaccess., error happening on multiple browsers, added upload settings in to wp-config.php file

    function.php don’t have any size settings as I’m using blank slate
    php.ini File is adjusted as you can see in setting from first post

    I adjusted host file, so im pointing to localhost. Therefore not need higher timeout. Anyway testing it on 2,5mb file with my 150/15MB should not be problem

    So any other ideas?

    Thread Starter Jirka283

    (@jirka283)

    Ok clean wordpress install on php7.2. just changed php.ini values, in browser it is showing new value but getting http error by uploading any file over 2MB

    Nobody have any idea?

    Thread Starter Jirka283

    (@jirka283)

    Found mistake. problem was with nginx configuration. In error log was getting something like:

    *153 client intended to send too large body

    whole msg looks like

    error] 31354#0: *10899 client intended to send too large body: 1198151 bytes, client: <IP address>, server: example.com, request: “POST /wp-admin/async-upload.php HTTP/1.1”, host: “example.com”, referrer: “https://example.com/wp-admin/post.php?post=<post id>&action=edit”

    easy to resolve, add this line in nginx configuration

    client_max_body_size 100M;

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Max upload file doesnt work’ is closed to new replies.