Error logs are meant for checking and controlling several errors. In WP, from time to time, several problems and errors occur, and the motive of setting up error logs in WordPress is to know various kinds of errors. We will discuss the ways of setting the WP error log in the wp-config.php file.

Ways of setting WP error logs


Nginx and Apache are the two main servers.  

Nginx for WordPress Error Log

● Error log and access log are the two essential logs

● A specific file, stderr, or Syslog logs the Nginx errors. 

● The main purpose of the file is to accumulate all the errors that happened throughout the web server process. 

● For logging only specific errors, you’ve to add a directive in the HTTP, stream, server, and section of the location.

Nginx: Types of logs

Error Log

If you see a White Screen of Death (WsoD) error, open the error log. It will help monitor and examine the mistakes that cause a problematic situation. The error log is very beneficial during


● debugging a website issues

● configuration of new plugins

● There is an installation of themes.

Access Log 

This can be beneficial for finding and examining 3rd party log checkers and for recognizing security problems like examining distributed denial of attack.


The Access log displays the IP addresses. Also, it gives information about which URL has been opened. This can be performed with a timestamp. 

What is Apache?

The open-source platform designed especially for website servers is called Apache. In Apache, standard httpd. Conf is present, which has a log section. This also shows detailed comments for every directive.

What does the Apache WordPress Error Log contain?

● There are errors in it.

● It has all notifications

● The warnings related to WP.

. It is transcribed in the website’s configuration file of Apache, commonly located in /etc/apache/sites-available/ folder

Way of setting it

This directive works well if you want to store all info about errors and inaccuracies in one log. However, you can specify an error log file for each domain. This can be accomplished in the <VirtualHost> sections in the following way.

Error defined in Apache

The errors are Apache, which includes the previous mistakes in the series. For example, if an info error occurs, all the mistakes stated before info will always happen.


●       emerg — emergency – The case in which the system is unable to perform the task;

●       alert —It depicts the error must be straightaway improved;

●       error;

●       warn — It is the sign of warning;

●       notice — For especially giving notification 

●       info — It is just an info message;

●       debug — For debugging the message 


WordPress Errr Logs in WP-Config File

You have to edit your wp-config.php file simply. You can open it by linking it to your website with a File Manager FTP. Here, we will discuss the steps regarding the cPanel’s file manager.


● Login to your cPanel account.

● Move to the file manager

● Go to the root directory.

● Then you will find a line there in which “That is all, stopping editing “is shown; simply above this line, you have to insert- define(‘WP_DEBUG,’ TRUE);

● Change the code to true if it is false.

● Through this line, the WP debug mode gets on.

Pro tip: Save the changes you have made and then upload your wp-config.php file again to your WP website.

Go through Your WP Error Logs


● Visit first the WP site

● Access the pages of errors and warnings.

● Connect to File Manager via cPanel.

● After connecting, move to /wp-content/folder.

● In that folder, you will get debug.log.

● You can download and view it, or if you want, you can edit this file.

● In this, all the WP warnings and errors are shown.



Final Thoughts

That’s all. We hope this article aided you in studying how to set up WordPress error logs in the WP-Config file. If you still face difficulties, ask us in the comment box.