How do I manage debugging in WordPress?
If you have problems with your WordPress site, activating debugging can help you find out what is wrong. When debugging is active, errors will be shown on the page where they occur.
In addition, you can use debug logging to log all errors to a file. However, this file is public by default , so we recommend using this feature with caution.
Note: Normally, debugging is used for development purposes only. Make sure to deactivate it after you have completed troubleshooting, as the error messages can give hackers information about vulnerabilities on your site.
- How to manage debug mode
- How to manage debug logging
How to manage debug mode
- Log in to your one.com Control Panel.
- In the menu on the left, go to Hosting settings and click File Manager.
You can also access your File Manager via the link https://filemanager.one.com - Navigate to the directory where you installed WordPress.
- Click on the file wp-config.php to open it in the editor.
- Scroll down to:
define('WP_DEBUG', false);
- Change this to:
define('WP_DEBUG', true);
- Click Save at the top of the screen.
- After you don't need debugging any more, deactivate it by changing the line back to how it was in Step 5, and click Save.
Tip: We recommend that you copy the code exactly as shown above; an extra space or wrong character can affect your whole site.
Did you know?
If you’re facing error messages that you can’t resolve on your own – even with the help of our guides and support – or don't have time to fix them, our WP Troubleshooting service can help.Use the contact form for Premium Care to get details, pricing, and priority assistance.
How to manage debug logging
If debug logging is active, all errors on your WordPress site will be logged to a file which is located in a public folder by default.
While this feature log can help with finding and fixing errors, a public error log can compromise your website's security, as it could include information which hackers could exploit. Therefore, we do not recommend activating this feature on a published site. If you need to use it, we recommend that you make your debug log private, or deactivate it and remove the error log from your site's public folder when you don't need it anymore.
Activate debug logging
Note: Debug logging can only be activated if debug mode is already enabled.
- Log in to your one.com Control Panel.
- In the menu on the left, go to Hosting settings and click File Manager.
You can also access your File Manager via the link https://filemanager.one.com - Navigate to the directory where you installed WordPress.
- Click on the file wp-config.php to open it in the editor.
- Scroll down to:
define('WP_DEBUG', false);
- Change this to:
define('WP_DEBUG', true);
- Click Save at the top of the screen.
- After you don't need debugging any more, deactivate it by changing the line back to how it was in Step 5, and click Save.
Tip: We recommend that you copy the code exactly as shown above; an extra space or wrong character can affect your whole site.
Related articles: