Skip to content Skip to navigation
Back to the main support

WP_DEBUG: enable error logging in WordPress

Our support team may ask you to activate the PHP constant “WP_DEBUG” in order to retrieve the error logs from your site.

Here is the procedure to follow for this:

  1. Connect to your server via FTP / SFTP (your host will help you with this if you do not have access and / or do not know how to do it).
  2. In the WordPress installation directory, open the wp_config.php file.
  3. Add this:
    define ('WP_DEBUG', true);
    define ('WP_DEBUG_LOG', true);
  4. Save the file and send it back to your server by FTP.
  5. The errors generated by your site will then be recorded in the debug.log file located in the wp-content folder.
  6. Refresh the page of your site that generates the error so that it is saved in your debug file.
  7. Send your file to our support team.
  8. Disable debug by deleting the 2 lines added previously or by passing the values “true” to “false”.