In case you run into an issue, it might be necessary to get more details about the cause of the problem. Therefore, we make use of WordPress’ debug logging.
Step 1: Enable the debug logging #
To enable debugging, prevent errors and warnings from being displayed and log errors, you need add the following lines to your wp-config.php file:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', false );
define( 'WP_DEBUG_LOG', true );
Most WordPress installations already have an entry for WP_DEBUG set to false, so you’ll need to change this value to true.
In order to edit the config file, please connect to your web server via FTP and navigate to the root of your WordPress installation.
The file itself can be edited by using a text editor such as Notepad++ (Windows only) or Sublime Text (Mac, Windows & Linux).
Step 2: Reproduce the error #
Now you have to reproduce the issue to get the log entry created.
Therefore, simply do what you did before when the problem occurred: For instance visit your WordPress dashboard/frontend and simply repeat the operation or refresh the page that isn’t working properly.
Step 3: View the debug log file #
The actual debug log is saved in a file called debug.log in your site’s wp-content directory.
One way to view and clear your log is to access that file directly via FTP. Alternatively, you can use a plugin like BugTrace and access the log directly via your admin dashboard.
Step 4: Send the log to our customer support #
You might be asked to send the log file to our customer support team. Therefore, simply download and attach it to your next email reply.
Alternatively, create a new Pastebin and send us the link to it.
FAQs #
Is it safe to enable WordPress debug logging on a live site?
Debug logging can be used on a live site, but errors and warnings should not be displayed publicly. Make sure WP_DEBUG_DISPLAY is set to false so errors are written to the log instead of being shown to visitors.
Where is the debug.log file located?
The default location is:
/wp-content/debug.log
If the file is not present, reproduce the issue after enabling debug logging so WordPress can create a log entry.
Why is my debug.log file empty?
The log may remain empty if no PHP errors or warnings are generated while reproducing the issue. Repeat the exact steps that caused the problem and then check the log again.
Should I clear the debug log before reproducing an issue?
Yes, clearing the existing log can make it easier to identify the errors related to the issue you are currently troubleshooting. This prevents older entries from making the log harder to review.
Should I disable debug logging after troubleshooting?
Yes. Once you have finished troubleshooting, it is recommended to disable debug logging by changing WP_DEBUG back to false.
Can I send only the relevant error from the debug log to support?
Yes. If the log contains a large number of entries, you can provide the relevant errors related to the issue. Make sure to include enough surrounding information, such as the error message, file path, and line number, to help identify the cause.