Issue Description
How to activate and how to write to the log file
How to Fix the Issue
- Make sure WP_DEBUG is turned on.
- Add the line “WP_DEBUG_LOG” to wp-config
- Errors are output to a file called “debug.log” which can be found inside “wp-content” folder
Fixed Code Snippets
//In wp-config.php
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true );
//To write to the log file:
error_log('error message or variable here');