question

felicianomarcos avatar image
0 Votes"
felicianomarcos asked NickoPekhlivanov-0479 edited

Web App Max Upload Size

Hi folks,

I installed WordPress with MySQL in App, and got 50MB as max upload file size, tried many solutions found even here on Q&A, MSDN and so on, but I'm not sure if this limit can be changed.

Has anybody been able to increase this limit? If yes, How?

Many thanks in advance!

azure-webappsazure-webapps-content-deployment
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ryanchill avatar image
0 Votes"
ryanchill answered ryanchill edited

Hi @felicianomarcos,

You can customize the PHP_INI_SYSTEM directives. In the kudu console, you can navigate to D:\home\site\wwwroot folder. Inside that, you'll see .user.ini file. Edit this file:

 upload_max_filesize = 200M
 post_max_size = 210M

Save the file and restart your app service. You should see this change reflected on the Media Library page.

31401-image.png

Regards,
Ryan



image.png (122.5 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

felicianomarcos avatar image
0 Votes"
felicianomarcos answered felicianomarcos commented

Hi @ryanchill thanks for your answer, but the issue I'm facing is related more to increasing the size of the files I can upload to my WebApp, I've created a few other tests, but I was not able to find any doc related to increase the max file size capacity for the host itself.

31089-image.png



I've done many tricks on WordPress side, and I was able to see it work on WP layer, but even though I was being blocked by WebApp somehow.

I even tried the following option under Linux hosting:

https://azureossd.github.io/2019/01/29/azure-app-service-linux-update-php-settings/

But now I'm using Windows due to the fact I can only have PHP 7.4, so what I'm checking if anybody has found a similar solution for Windows.

I see from the print you provided, there is this option for "max upload file size", but do I need to install the multisite?

On the article, I see the max file size is set to 300MB, and I'm trying to do the same, do you know how to change this setting?


Many thanks in advance!


image.png (32.6 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@felicianomarcos please see my updated answer; that should work. Let me know if you still run into problems.

0 Votes 0 ·

Hi @ryanchill thanks for your reply, did as you informed and at first it seemed that it worked, but then when I tried to test by uploading a 93MB file, I still get a kind of blocking and by the message it seems to be something in the server, as I show bellow:

32277-image.png



I can see the setting is changed, but somehow I am not allowed to upload bigger files.

I also increased the settings on the WordPress side, to reflect the change on the server, but still no success.

I'm still researching, but do you still have any light on that?

0 Votes 0 ·
image.png (42.2 KiB)
NickoPekhlivanov-0479 avatar image
0 Votes"
NickoPekhlivanov-0479 answered NickoPekhlivanov-0479 edited

It seems the problem is related to the IIS configuration.
You may have to edit web.config, <system.webServer> section and add the following to set a 200 MB limit:

<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="209715200" />
</requestFiltering>
</security>

The web.config file is in "wwwroot".



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.