skip to Main Content

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!

2

Answers


  1. To fix, you need to set server block like this

    server {
    client_max_body_size 0;
    ...
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search