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

rene's avatar
Level 2

Homestead Memory Limit

Hello, Where can I add something in my Homestead.yaml which can set the memory limit to a specific value?

0 likes
5 replies
connor11528's avatar

When trying to run a composer install we're getting a PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 134217736 bytes). To resolve this is it best to up the memory limit in Homestead's php.ini file versus the memory on the Homestead box?

$ vagrant ssh
$ vi /etc/php/7.4/cli/php.ini

This is in our php.ini:

; Maximum amount of memory a script may consume
; http://php.net/memory-limit
memory_limit = 512M

And we have this in Homestead.yaml (default):

memory: 2048
2 likes

Please or to participate in this conversation.