How to Enable Error Log in WordPress

How to Enable Error log in WordPress using wp-config.php file

Do you want to enable error log in WordPress but do not know how to do it ? keep reading this post. 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 How tp 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.

How to Enable Error log in WordPress using wp-config.php file

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.

How to Enable Error Log in WordPress

How to Enable Error log in WordPress using wp-config.php file

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.

If you like my work, Please Share on Social Media! You can Follow WP knol on FacebookTwitterPinterestQuora 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.

About Amar Patel 263 Articles
Hi, I am Amar Patel from India. Founder, Author and Administrator of I am a Simple Average Man who Loves life and Love living life.Professionally I am a Mechanical Engineer. Apart from my Job, I Love to write the things around WordPress WordPress CMS.

Be the first to comment

Leave a Reply

Your email address will not be published.