This issue has been covered here on Laracast before:
https://laracasts.com/discuss/channels/servers/valet-and-memory-usage
The settings are shown here:
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
How can I change the memory limit for laravel valet?
This issue has been covered here on Laracast before:
https://laracasts.com/discuss/channels/servers/valet-and-memory-usage
The settings are shown here:
I'm looking for change a configuration and how do it?
do you have the access of php.ini then you might have to edit your php.ini file. Have a look for upload_max_filesize, memory_limit and post_max_size.
But I've at
/usr/local/etc/php/7.0/php.ini memory_limit = 256M
but phpinfo() shows 128M
can you please show php.ini code where you made changes
please also check the below link and try the same
https://github.com/laravel/valet/blob/master/cli/stubs/php-memory-limits.ini
The file is at /usr/local/etc/php/7.0/php.ini (like see in phpinfo())
The file is too many long, but I have:
[...] ; Maximum amount of memory a script may consume (128MB) ; http://php.net/memory-limit memory_limit = 256M [...] ; Maximum allowed size for uploaded files. ; http://php.net/upload-max-filesize upload_max_filesize = 255555M [...] ; Maximum size of POST data that PHP will accept. ; Its value may be 0 to disable the limit. It is ignored if POST data reading ; is disabled through enable_post_data_reading. ; http://php.net/post-max-size post_max_size = 8M [...]
i know this is a OLD question but here is the answer. in /usr/local/etc/php/7.0/conf.d there is an additional .INI by name php-memory-limits. there you will find the limitations.
You can find valet limits in this file
/usr/local/etc/php/7.2/conf.d/php-memory-limits.ini
The file has 3 limits : memory_limit, upload_max_filesize & post_max_size
change in this file and the new values will appear in phpinfo()
Only changing the values on /usr/local/etc/php/x.x/conf.d/php-memory-limits.ini is not doing the job anymore.
/usr/local/etc/php/X.X/php-fpm.d/valet-fpm.conf PHP-FPM pool configuration file, is the place where memory limits can be modified
Thank you. You saved me a lot of time :)
This should be the correct answer for now.
OS: macOS 10.15.3 Valet: 2.8.1 PHP: 7.4.3 I changed
/usr/local/etc/php/7.4/conf.d/php-memory-limits.ini
memory_limit = 512M
I run valet restart to restart all
then I run
php -i | grep memory_limit , the output is correct.
memory_limit => 512M => 512M
But when I go to web version. http://phpinfo.test/ to view my phpinfo(). It is still 128M.

My PHP-CLI is taking the new value effect, but web version does not work. In the phpinfo(), I check all the ini file, all is updated to 512M.
I even run valet restart nginx manually also does not take the new value effect.
Any idea? Where I missed?
Ok, The treat is after I restart my Mac, the value is updated... RESTART is the most powerful skill
How I can save old /usr/local/etc/php/8.0/conf.d/php-memory-limits.ini settings then switching between multiple php versions?
I have made alias because settings always changes.. Any solutions?
alias 80php="brew unlink php && brew link --force [email protected] && valet use [email protected] --force && nano /usr/local/etc/php/8.0/conf.d/php-memory-limits.ini"
If you installed the PHP with homebrew or have the multiple PHP version then the first check which is files are picked up by the current version of PHP
php --ini
In the response you will find the file which is used by the PHP,
Configuration File (php.ini) Path: /opt/homebrew/etc/php/8.0
Loaded Configuration File: /opt/homebrew/etc/php/8.0/php.ini
Scan for additional .ini files in: /opt/homebrew/etc/php/8.0/conf.d
Additional .ini files parsed: /opt/homebrew/etc/php/8.0/conf.d/error_log.ini,
/opt/homebrew/etc/php/8.0/conf.d/ext-opcache.ini,
/opt/homebrew/etc/php/8.0/conf.d/php-memory-limits.ini
Mostly it will be the php-memory-limits.ini file which you are looking for.
Please or to participate in this conversation.