Tag: Laravel Valet

  • 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.

  • Fix 504 Gateway Timeout in Laravel Valet


    proxy_connect_timeout 1200;
    proxy_read_timeout 1200;
    proxy_send_timeout 1200;
    fastcgi_read_timeout 1200;
    fastcgi_send_timeout 1200;

    In /opt/homebrew/etc/nginx/nginx.conf, right before:

    include "/Users/.../.config/valet/Nginx/*";
    include servers/*;
    include valet/valet.conf;

    All credit to / solution from:



  • Solving MySQL error with Laravel Valet on macOS Ventura

    After updating to macOS Ventura, everything seemed to be fine with my Laravel Valet (v4.1.2) setup, but after restarting / doing some other thing which screwed everything, I couldn’t connect to the database properly.

    I tried everything.

    In the end how I fixed it was abandoning MariaDB (& removing all any any traces of it), dumping the my.cnf file in /opt/homebrew/etc and install MySQL v8.0.33 via homebrew.

    How much of that was really necessary, I’m not sure, but the key step was deleting the my.cnf file in /opt/homebrew/etc.

    Until then the brew install mysql would continually fail at the last step on the brew postinstall mysql step.

    (When I tried it ignore this step I would constantly bump into an ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) error).

    In case it was relevant, I also completely removed Laravel Valet – valet uninstall force – and only re-installed it after I was sure MySQL was OK.

    I also switched to using PHP v8.0 locally (as that’s what I’m running all my sites on right now anyway) before doing the valet install (including the initial composer install).

    EDIT #1: Here’s what the my.cnf file looked like once it was working again:

    # Default Homebrew MySQL server config
    # Only allow connections from localhost
    bind-address =
    mysqlx-bind-address =

    EDIT #2: Found similar solution here https://andy-carter.com/blog/resolving-post-install-issue-with-mariadb-install-via-homebrew