How to create error log file in WordPress

How to create error log file in WordPress

Very often when you contact technical support they ask you send them an error log file. In this short instruction I am going to tell you where you can find it and how to create it.

Usually log file looks as on the picture above.  To create it you need to first open the configuration file of website ‘wp-config.php’. Find in it such record:

define('WP_DEBUG', false);

and replace it with this code:

define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', false);
define('WP_DEBUG_LOG', true);

First record turns on WordPress debugging of you website. Second one does not allow errors and notifications to display them on the frontend part of the site. The third, in fact, creates a debug file and writes in it all information about the problems that occur with the website.

To get this information you need load in an Internet browser the website page where you suppose there is an error. Then go to the ‘wp-content’ folder of your site via FTP. You will find a ‘debug.log’ file there. Now you can send it to the support assistant. That is all.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.