How to Enable Error Log in WordPress -: Error log is very useful to troubleshoot the problem on your WordPress website. When we do some changes to our WordPress website and if some error happens which stop our website for loading or give WordPress White Screen of Death. Most of the time it hard to imagine what went wrong. any error happens on WordPress stored in the form of a log. it is a type of record to figure out what went wrong and fix it. setting up error log in WordPress is very easy. In this post, I will explain how to enable error log in WordPress using wp-config file.
How to Enable Error logs in WordPress using wp-config.php file-:
Log in to Your Hosting cPanel or you can use Filezilla FTP client, for complete guide read my post How to use Filezilla FTP client with your WordPress Hosting. Take the backup of wp-config.php file before editing it.
find the line /* That’s all, stop editing! Happy blogging. */ in your wp-config file. add the following code.
define( 'WP_DEBUG', true );
and change true with false This will enable debug mode. Note: You will also see warnings or error in your WordPress admin if they exist. then again change false with true.You can then enable the debug log to send all errors to a file by adding the following code just after the WP_DEBUG line (as seen below):
define( 'WP_DEBUG_LOG', true );
Both the code will look like below image. Save your wp-config file and upload it back to your website. Your Debug log file will look like below image. Once connected, go to /wp-content/ folder and inside it, you will find a file called debug.log.You can download, view, or edit this file. It will contain all WordPress errors, warnings, and notices that were logged.
Conclusion-: Error log in Must have a thing for any WordPress user to find out the problem and fix it. If your error log showing an error that related to Your WordPress Hosting then you can share this log file to your hosting provider and ask for a solution. It will be also easy for your Hosting provider to figure out the problem and fix it.
Thanks for reading…“Pardon my grammar, English is not my native tongue.”
If you like my work, Please Share on Social Media! You can Follow WP knol on Facebook, Twitter, Pinterest and YouTube for latest updates. You may Subscribe to WP Knol Newsletter to get latest updates via Email. You May also Continue Reading my Recent Posts Which Might Interest You.