Roots Discourse

Increase maximum upload size on development env


#1

Tried define('WP_MEMORY_LIMIT', '64M'); in my application.php under the Bedrock Config folder but no cigar. Can’t find any support online for how to change this. Using Trellis and I tried reprovisioning the server but it still only allows uploads up to 25mb. Any advice?


Increasing WP_Memory_Limit
#2

You’ll need to increase both the php_post_max_size and php_upload_max_filesize in roles/php/defaults/main.yml and then reprovision the server again.


#3

I’m not sure to understand why some wp config elements are on Trellis side and other on Bedrock side. Any hint ?


#4

Thank you for responding! Did what you suggested but now I am getting a ton of warnings when I go to wp-admin saying Warning: Cannot modify header information - headers already sent. I’m unable to access the wp-admin.


#5

Trellis controls what PHP’s maximum limit is, which could be something really big like 256M, then in Bedrock you tell WordPress how much it’s maximum limit is, so you could set that to something lower like 32M


#6

:confused: I wasn’t expecting that.

Do they give any hint as to where it’s coming from? I’ve had this recently with some plugins.

Are you also setting a limit in Bedrock?


#7

Yeah, the rest of my question is off-topic :blush: Thanks


#8

I removed any alterations to the limit in bedrock. This is where most of it is coming from /current/web/wp/wp-includes/functions.php:3897


#9

I’ve just tried this using my site and haven’t had any errors since changing both values up to 50M

The only thing I can suggest is disabling plugins to try and debug if any of them are altering the headers


#10

The issue was me deregistering jQuery in my themes functions.php. For some reason it wasn’t recognizing my !is_admin() conditional so I rewrote it and it works :smiley: Thanks for the help.