Overview
If you are experiencing issues with a plugin or particular WordPress configuration, you can enable the detailed debug logs to capture detailed information to help determine the cause. This additional information may also be required for your plugin or theme developers upon request as well. This article will guide you through the process to enable.
Instructions
- Login to Plesk (or via the Conetix Control Panel) and select the domain you wish to enable WordPress debugging for.
- Select the WordPress Toolkit:
- Click Check security:
- To prevent accidental data leakage, we want to ensure that we Block access to potentially sensitive files:
- Check and tick secure if there’s no green tick beside this item.
- Return to the WordPress Toolkit, then click on the settings button beside Debugging:
- Enable WP_DEBUG and WP_DEBUG_LOG. If there are other options enabled (eg, WP_DEBUG_DISPLAY) we highly recommend disabling these:
- Click OK and this will enable the additional debug logs. The slider within the WordPress Toolkit will also indicate that the debug logs are enabled:
- To view the output of the debug logs, these can be either read via the Plesk File Manager or by using the Plesk Log Browser. To read via the Plesk Log Browser, return to the main Domains section, then select Logs:
- At the top right of the Log Browser, click on the dropdown and select Add custom log:
- Navigate to httpdocs/wp-content/ (or the equivalent wp-content if your directory structure is different) and select the debug.log file:
- To view only the output of the debug.log file, go to the top right log file menu again and deselect all other logs. You should only have debug.log selected:
- This will now display just the debug log output:
- Once you’ve gathered the required logs, the next step is to disable the debug log again. Return to the WordPress Toolkit and click on the slider to disable.
- Finally, to ensure there’s no accidental leakage of data, you should delete the debug.log file completely. To do this, go to the Plesk File Manager:
- Navigate to httpdocs/wp-content/ (or the equivalent wp-content if your directory structure is different), then select debug.log and click Remove: