WP_DEBUG: Enable error logging in WordPress

In some cases our support staff might ask you to attach an error log file to your support ticket. This article explains how you retrieve that file in WordPress.

🛠 Note: In order to enable WordPress’ debug mode and error logging, the wp-config.php file on your server needs to be edited. It is perfectly ok if you don’t feel comfortable doing so! Please let our support staff know about it, so we can assist you better.

1

Open your wp-config.php and replace this line:

define('WP_DEBUG', false);

with these 3 lines:

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

In case the first line is not present already in your wp-config.php, just add the 3 lines.

2

Save the file, go back to WordPress and try to do whatever you were doing when the behaviour had occurred first.

Once you have done so, a file named debug.log will appear in the wp-content folder of your WordPress install (you may have to refresh the folder view in your FTP client).

3

Download the debug.log file and send it to our support staff.

4

Set the line of WP_DEBUG back to false:

define('WP_DEBUG', false);

☝️ Heads up! You can leave the other 2 lines you had added, but if you don’t set WP_DEBUG to false again, the debug file could easily grow in size very fast; so make sure you complete this last step.