Enabling the debug.log file

Edit the wp-config.php file:

//Instead of using this line
//define('WP_DEBUG', false);
//Use these three lines:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', false );
define( 'WP_DEBUG_LOG', true );

You’ll now get the same output, but written to the file instead of shown to users at the top of the page.

Viewing the file

This file will be written in: /wp-content/ directory

Open this file using SSH or your FTP client to view the debug reports.

View it live
sudo tail -F /var/www/html/wp-content/debug.log