Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

image-plus-jesse's avatar

What is the default "Max File Upload Size"? How to set the limit per app instead of per server?

Hi. On Forge, there exists a "Max File Upload Size" setting for each server. If it's left empty, what value is it supposed to default to? This information doesn't seem to be documented on the official documentation.

Also, is it possible to set the size limit per app, instead of per server? I have a WordPress site set up on a Forge server (which is serving other sites) that I'd like to set the limit of to 20MB. So far, I have tried editing the "nginx.conf" file through the "Edit Nginx Configuration" button on Forge then adding client_max_body_size 20m; inside of the server scope. I also tried adding:

@ini_set( 'upload_max_size' , '20M' );
@ini_set( 'post_max_size', '20M');

to the theme's "functions.php" file.

I wanted to try using the "Increase Maximum Upload File Size | Increase Execution Time" plugin by "CodePopular", but it said on its FAQ that "server adjusted limits can’t be changed from a WordPress plugin", which is why I asked my earlier question.

Edit 1: I just tried installing the plugin, but it indicated that the "Maximum Upload Limit Set By Hosting Provider" is set to 2MB, so presumably that answers my first question (since that setting on Forge for the server is currently blank).

0 likes
2 replies
aknEvrnky's avatar

I'm not an expert on forge but I can say that default upload size is 2MB and default post size is 8MB as php default. You can edit your php.ini file to set custom values.

You can run php --ini to locate where your .ini file is. Then search for is there any either upload_max_size or post_max_size exists. If not, you are free to define yours.

image-plus-jesse's avatar

@aknEvrnky Thanks! Will editing "php.ini" also affect other sites on the server? It's currently running multiple sites, so if possible, I'd like to only set the file size upload limit for one of them and leave the rest as they are.

Please or to participate in this conversation.