简体   繁体   中英

Wordpress: 413 Request Entity Too Large

I have a WP site managed on an Ubuntu server with Plesk. For a few hours I can not upload files above 2MB. I have made several attempts like:

  • Change the settings from php.ini (verifying via phpinfo () that they were set correctly). Both through Plesk and manually;
  • Change different PHP versions (from 5.6, 7.0.x, 7.1.x, to 7.2.x);
  • Disabled firewall;
  • Tested with different types and name files;
  • Set the upload limit with nginx (either manually or via plesk);
  • Tried to set the limit via .htaccess and / or wp-config;
  • Updated WP, ​​plugins and themes;
  • Disabled all plugins;
  • Try to decrease the upload limit to 1 MB (in this case it displayed the limit and did not allow me to proceed with the upload);
  • Tested by other PC / browsers.

On other sites uploaded to the same server, with the same settings (one is the backup of the site in question) instead I can correctly upload the files.

On the file upload screen I see the upload limit correctly (for example 64M) but if I upload a file greater than 2MB I see the error:

413 Request Entity Too Large

What could it be? Do you have any ideas / suggestions on this?

Thanks a lot!

To fix, you need to set server block like this

server {
client_max_body_size 0;
...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM