Increase PHP memory limit in Laravel Valet

In /opt/homebrew/etc/php/8.0/php.ini – or whichever PHP version you’re running – find and increase memory_limit to 512M or 1024M or whatever you need to debug.

(If the memory_limit line is commented out – i.e. has a prefix of ; – make sure to remove it).

You may also need to add the following line to your wp-config.php (matching whatever value you set in php.ini):

define( 'WP_MEMORY_LIMIT', '1024M' );

Finally, you should probably run valet restart from the command line.