Increasing WP_Memory_Limit

I’ve tried updating the trellis files listed below and adding

define( ‘WP_MEMORY_LIMIT’, ‘512M’ );

To /site/config/environments/development but the limit on my site is still 128M. What am I missing? I’ve reprovisioned the server and ran composer update.

Continuing the discussion from Increase maximum upload size on development env:

1 Like

Have a look here: Http error media upload

1 Like

No dice. I reloaded nginx but the php info page still shows the old value for memory limit of 128M

I have this set in users/php/default/main:

php_memory_limit: 512M

Is there somewhere else where this value is set?

Gotta ask this, but did you re-provision the server after updating that value?

Note: you shouldn’t update roles/php/default/main.yml either. You should override that value in a group_vars file (either globally or for a specific environment).


@swalkinshaw How should that be formatted in the group_vars files?

Same as was posted above:

php_memory_limit: 512M

@swalkinshaw Oh, it doesn’t need any parent-level indentation or anything? Just drop it into the bottom of the file with no indentation?

Yes, you can follow the examples of lots of vars like that already:

Whoops! My bad, I was thinking you were talking about adding these to wordpress_sites.yml. Doh. I appreciate the help sir!

“Re-provision” – sorry, what does it mean ? It’s about this command "ansible-playbook server.yml -e env=production " ?

Yes, see

1 Like

I found this helpful: