WordPress supports debugging, either to the web page or to a log file.
To enable WordPress debugging edit the file wp-config.php in the root of the website I like to have an entry for each of the following.
define(‘WP_DEBUG’, false);
define(‘WP_DEBUG_LOG’, false);
define(‘WP_DEBUG_DISPLAY’, false);
On a production website, or one publicly visible, its better to keep error messages away from the screen. Therefore, to view the errors enable debugging and choose to use the log file by setting these to true:
define(‘WP_DEBUG’, true);
define(‘WP_DEBUG_LOG’, true);
define(‘WP_DEBUG_DISPLAY’, false);
The log file debug.log is saved in the directory wp-content. view the file either through the hosting control panel or by downloading it with FTP.
If you are saving to a log file, don’t forget to remove it once you are finished. Hiding the errors from public view is the obvious action to take. But for those who wish to find out more about your website than you are willing to give, stray log files are a handy source of info.


