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 is used for logging of the Nginx errors. 

● The main motive of the file is to accumulate all the errors that happened throughout the process of the webserver. 

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

Nginx: Types of logs

Error Log

In case you see White Screen of Death (WsoD) error, the significant thing you need to do is opening the error log. It will help in monitoring and examining the errors which 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 the finding and examination of 3rd party log checkers and for recognizing and security problems like examination of 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 comments in detail for every directive.

What does 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 The configuration file of Apache commonly located in /etc/apache/sitesavailable/ folder

Way of setting it

This directive works well if you want to store all info about error 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 includes the previous errors in the series. Take the following example if info error occurs, then all the errors which are stated before info will always happen.


●       emerg — emergency – The case in which the system 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 to your website by a File Manager via or 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 your changes which you have done and then do uploading 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, or if you want you can edit this file.

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



Final Thoughts

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