Steps To Set Up WordPress Error Log In wp-config.php File

WordPress error log

WordPress Error log helps to diagnose errors that occur on your WordPress website quickly. WordPress Error Log or debug mode can be set up in the wp-config.php file. Wp-config is present in the WordPress directory that stores core WordPress Functional settings code and configuration setups. It also establishes a connection with your database, creates verification keys, which makes your website secure. Wp-config File can also work as a debugging tool that helps to find the error in WordPress.

Why Do We need WordPress Error Logs?

WordPress error logs help to identify the error quickly, wp-config works as debugging mode that stores or saves error in the File. it lets you check which plugin or theme, and File is causing the error.

Let’s understand, WordPress error log set up in the wp-config file step by step.

How To Set Up WordPress Error Logs in WP-Config File

Pro Note: Before editing the wp-config.php, I would like to advise you, please take the backup of the File on your computer.

To create WordPress error log, you need to edit wp-config.php File. Access this File by through the FileZilla FTP software, or you can also login to the Cpanel.

WordPress error log

You must open File, and search for the phrase “*/That’s all, stop editing! Happy blogging/*.’ and

You have to paste the below code befroe the phrase.

define ('WP_DEBUG', true );

It might be possible that the code exists in the wp-config File, and it is set to the “false” command. Just change it to “true”. and save the file.

This code that you have placed enables WordPress debugging mode. One of the disadvantages of this debug code is that the errors start displaying on the front page of the website as well.

So you must also add the below code in the Wp-config.php file to create an error log.

define( 'WP_DEBUG_LOG', true );

and remember, you must click on save changes.

How to check WordPress Error Log?

  • Go to your WordPress website navigate to the paged tat is indicating errors or showing warnings.
  • Then connect website through FTP software login to Cpanel
  • Once you have connected successfully, navigate to the wp-content/ folder; inside this folder, you see a file named debug.log.
WordPress error log
  • This debug.log file contains all WordPress error logs and warnings.

Conclusion

In this article, we have tried to explain all about the WordPress error log. The above-stated information may help you to understand WordPress errors in a better way. You can check our blog on several common WordPress Errors such as http error 500 WordPress, Error 502 bad gateway, http error WordPress image upload.

If you like this article, please subscribe to our youtube channel like us on Facebook you can also find us on twitter and instagram.

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *