WordPress provides a debug tool to help discover what may be the cause of an error on your website. This tool can display information on your live website, however, this is not recommended if your website is live to the public. Instead, it's recommended to create a debug log file. You can then check that log file to determine the cause of the issue you're attempting to resolve.
This article walks you through how to enable Debug mode and write to a log file without disturbing your live website.
1. Log into your server via SSH or FTP.
2. Edit the wp-config.php file using SSH or your FTP client.
3. Near the bottom of the file you'll see the following:
define('WP_DEBUG', false);
Adjust that line to these three lines:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', false );
define( 'WP_DEBUG_LOG', true );
It's not recommended to change WP_DEBUG_DISPLAY to true. This is because any errors will then display on your live website. By enabling WP_DEBUG_LOG, you can view the same errors in your /wp-content/debug.log file.