• Resolved wrknight

    (@wrknight)


    I am attempting to restore my wordpress site from updraftplus backup files made last week. There are five files. The first is a small gunzip file that is 1.2MB. It uploads perfectly

    The remaining files are zip files starting at 2.4MB and going up to 35MB (yes, this is a small website). Each of the remaining files attempts to upload, reaches what appears to be about 2MB, stops and gives me the 202 error code.

    I am running my website on my own server with Ubuntu 20.04, nginx, mariadb, php and wordpress 5.5.1.

    I have made the following configuration file changes:

    In nginx.conf, I added the following:
    client_max_body_size 200M;

    In php.ini, I modified the following:

    upload_max_filesize = 200M
    max_file_uploads = 20
    Post_max_size = 256M

    In wp-config.php, I added the following:

    @ini_set( 'upload_max_filesize' , '200M' );
    @ini_set( 'post_max_size' , '256M' );
    @ini_set( 'memory_limit' , 256M' );

    Even with these parameters set in the three configuration files I am still getting the message
    413 Request Entity Too Large nginx/1.18.0 (Ubuntu)

    Can anyone help?

    • This topic was modified 3 years, 6 months ago by wrknight.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor bcrodua

    (@bcrodua)

    Hi,

    “413 Request Entity Too Large”
    This indicates that the server has been set to refuse uploads over a certain size (some servers can be as low as 2MB).

    Alternatively, you can upload the backup files via FTP/cPanel File Manager.

    Regards,
    Bryle

    Thread Starter wrknight

    (@wrknight)

    Yes, you are right, but your answer doesn’t help. I own my own host and am not using a commercial hosting service for this site. There is no cPanel and I don’t use ftp for uploading as everything is controlled from the console attached directly to my computer.

    I can set my server to anything I want and have set the file upload limit to 200M in every configuration file I am aware of (see above) and cannot find where the 2M restriction is hiding.

    Thread Starter wrknight

    (@wrknight)

    So far I have identified 5 configuration files that can effect limits on uploading files. They are
    nginx.conf – in /etc/nginx
    php.ini – in /etc/php/7.4/fpm/php.ini
    php.ini – in /etc/php/7.4/cli/php.ini (I have no idea why there are 2)
    wp-conf.php – in /var/www/wordpress/content
    functions.php – in /var/www/wordpress/content/themes/twentyfifteen

    In all configuration except nginx.conf files I have set
    upload_max_filesize = 200M
    post_max_size = 256M
    memory_limit = 256M

    In nginx, I set
    client_max_body_size 200M

    Files and images less than 2M load successfully

    Uploading image files larger than 2M get error message:
    Post-processing of the image failed likely because the server is busy or does not have enough resources. Uploading a smaller image may help. Suggested maximum size is 2500 pixels.

    Uploading pdf files larger than 2M sometimes gets error message:
    Unexpected response from the server. The file may have been uploaded successfully. Check in the Media Library or reload the page.
    and other times gets message:
    413 Request Entity Too Large – nginx/1.18.0 (Ubuntu)
    Error message is not consistent – but the file doesn’t upload in either case.

    More details:
    System motherboard: Gibabyte GA Z79X-SLI
    System CPU: Intel I5
    System memory: 32GB
    OS Linux version: Ubuntu 20.04 (Mate desktop environment)
    Nginx version: 1.18.0 (Ubuntu)
    Mariadb version: 15.1 Distrib 10.3.22-MariaDB, for debian-linux-gnu (x86_64)
    PHP-FPM version: 7.4
    Wordpress version: 5.5.1

    What am I doing wrong?

    Thread Starter wrknight

    (@wrknight)

    RESOLVED

    In addition to the configuration files shown above, it is also necessary to increase the file sizes in the nginx server block for the site by changing the default setting:

    client_max_body_size 2M

    to a larger value. For my site I changed it to

    client_max_body_size 200M

    and now all files upload perfectly, even the updraftplus backup files.

    I’m not sure why so many configuration files are involved in what should be a simple modification.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Upload error code 202″ HTTP error 413’ is closed to new replies.