![enable error log in cpanel whm enable error log in cpanel whm](https://screens.kgix.net/bz/img_13-38-43.png)
We also tell it not to display errors in the interface, because that’s not a good look for a production website. We’re telling WordPress to turn on debugging mode and output error messages to the log file.
![enable error log in cpanel whm enable error log in cpanel whm](https://www.veerotech.net/kb/wp-content/uploads/2019/03/file-1.png)
#ENABLE ERROR LOG IN CPANEL WHM CODE#
*/Īdd the following code above that line and then click Save: define( 'WP_DEBUG', true ) ĭefine( 'WP_DEBUG_DISPLAY', false 'display_errors', 0 ) Scroll down to the line that reads: /* That's all, stop editing! Happy blogging. Select it and click Edit in the menu bar. Your WordPress site is probably in the root or a subdirectory of public_html, although it might be somewhere else if your server has a non-standard configuration.Ĭlick on the directory containing the site and find the wp-config.php file in the right-hand pane. The wp-config.php file contains WordPress’s configuration, and, with a couple of lines of code, you can turn on debugging mode and tell WordPress to write errors to a log.įirst, fire up cPanel’s File Manager, which you will find in the main page’s Files section.
#ENABLE ERROR LOG IN CPANEL WHM HOW TO#
How to Monitor WordPress Logs in cPanelīefore you can troubleshoot with logs, you’ll need to tell WordPress or PHP to start logging. If you’re in a “White Screen of Death” situation where WordPress isn’t working at all, the logs might be the only way to see what’s going on under the hood. If it’s consuming excessive server resources, a plugin is broken, or pages don’t load, the logs can tell you why. Error logs are a time-ordered list of these messages.Įrror logs are incredibly useful for figuring out why WordPress isn’t behaving as you think it should. Either way, the developers want to let you know, so they write code to log a message to a file. A line of code might have a typo in it, or the code might be fine, but something unexpected happens when it’s executed. WordPress is written in PHP, so it handles WordPress’s error messages and logging.Įrrors occur for lots of reasons. What is a PHP Error Log?Ī PHP error log lists warnings and error messages, which are generated by the language runtime and saved to a file. In this article, we describe what PHP error logs are and why they’re useful, before explaining how to use cPanel & WHM to activate and configure both WordPress logs and the PHP runtime’s logging functionality. PHP error logs, including WordPress logs, can help you to spot problems and identify the offending plugin, theme, or custom code. It’s often difficult to find the cause of unexpected behavior in WordPress® and other PHP applications.
![enable error log in cpanel whm enable error log in cpanel whm](https://cp.get.art/kb/sites/default/files/cPHulk_WHM_Configure.png)
PHP error logs are one of the most useful tools for diagnosing web hosting issues.