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
Most probably that the reason of this issue is ModSecurity settings. Check solution from https://support.plesk.com/hc/en-us/articles/115001764933-Unable-to-edit-document-on-the-website-ModSecurity-Request-body-no-files-data-length-is-larger-than-the-configured-limit-
To fix, you need to set server block like this