WordPress Error Log Not Showing with Laravel Herd
If you’re encountering issues with Laravel Herd where error logs are not showing up in WordPress, the solution involves adjusting the log configuration for PHP-FPM. Here’s how you can resolve this:
Step-by-Step Solution
Step 1: Locate the Log File
Laravel Herd writes logs to the following file:
/Users/{user_name}/Library/Application Support/Herd/Log/php-fpm.log
Step 2: Adjust Configuration Files
Navigate to the configuration directory:
/Users/{user_name}/Library/Application Support/Herd/Config/fpm
In this directory, you’ll find configuration files for different PHP versions, named as [php_version]-fpm.config
. example 8.2-fpm.config
Step 3: Modify Configuration Files
Open each configuration file and comment out the php_admin_value[error_log]
line. Add a semicolon ;
at the beginning of the line:
;php_admin_value[error_log] = /Users/{user_name}/Library/Application
Step 4: Restart Herd Services
After modifying the configuration files, go to Herd and stop all services. Then, start all services again.
Result
You should now see your logs in the wp-content/debug.log
file of your WordPress installation.
Example
;php_admin_value[error_log] = /Users/{user_name}/Library/Application
By following these steps, you can ensure that your Laravel Herd logs appear correctly in the WordPress debug log file. This solution helps in troubleshooting and monitoring errors more effectively within your WordPress environment.
I began my WordPress journey in 2013 by editing themes, sparking my passion for web development. By 2016, I had transitioned into a professional WordPress developer role. Over the years, I’ve worked with various companies and on numerous projects, eventually leading development teams and guiding projects from conception to completion. As a WordPress enthusiast, I am dedicated to building innovative solutions and contributing to the WordPress community.