Title: Upload error code 202&#8243; HTTP error 413
Last modified: October 16, 2020

---

# Upload error code 202″ HTTP error 413

 *  Resolved [wrknight](https://wordpress.org/support/users/wrknight/)
 * (@wrknight)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/upload-error-code-202-http-error-413/)
 * 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 5 years, 7 months ago by [wrknight](https://wordpress.org/support/users/wrknight/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fupload-error-code-202-http-error-413%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Contributor [bcrodua](https://wordpress.org/support/users/bcrodua/)
 * (@bcrodua)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/upload-error-code-202-http-error-413/#post-13546572)
 * 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](https://wordpress.org/support/users/wrknight/)
 * (@wrknight)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/upload-error-code-202-http-error-413/#post-13546755)
 * 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](https://wordpress.org/support/users/wrknight/)
 * (@wrknight)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/upload-error-code-202-http-error-413/#post-13547288)
 * 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](https://wordpress.org/support/users/wrknight/)
 * (@wrknight)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/upload-error-code-202-http-error-413/#post-13547705)
 * **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.

 * ![](https://ps.w.org/updraftplus/assets/icon-256x256.jpg?rev=1686200)
 * [UpdraftPlus: WP Backup & Migration Plugin](https://wordpress.org/plugins/updraftplus/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/updraftplus/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/updraftplus/)
 * [Active Topics](https://wordpress.org/support/plugin/updraftplus/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/updraftplus/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/updraftplus/reviews/)

## Tags

 * [filesize](https://wordpress.org/support/topic-tag/filesize/)

 * 4 replies
 * 2 participants
 * Last reply from: [wrknight](https://wordpress.org/support/users/wrknight/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/upload-error-code-202-http-error-413/#post-13547705)
 * Status: resolved