What You’ll Learn
- Enable WordPress debug mode
- Configure error logging to a file
- Access and read the debug log
Prerequisites
- FTP or file manager access to your Dashboard site
- Ability to edit wp-config.php
Enable Error Logging
1
Access wp-config.php
Connect to your MainWP Dashboard site via FTP or your hosting file manager and open
wp-config.php.2
Add debug constants
Insert the following code before the line
/* That's all, stop editing! Happy blogging. */:3
Save the file
Save your changes to wp-config.php.
What Each Setting Does
| Constant | Purpose |
|---|---|
WP_DEBUG | Enables debug mode, which enables error tracking |
WP_DEBUG_LOG | Writes errors to /wp-content/debug.log |
WP_DEBUG_DISPLAY | When false, hides errors from visitors while still logging them |
Access the Debug Log
Find your error log at:- FTP or SFTP
- Hosting file manager
- SSH command:
tail -f /path/to/wp-content/debug.log
Disable Error Logging
When you’ve finished troubleshooting, disable debug mode to improve performance and security:Self-Check Checklist
- Debug constants are added to wp-config.php
- Constants are placed before the “stop editing” line
- debug.log file is being created in /wp-content/
- Errors are being logged when issues occur
Related Resources
- Troubleshoot Connection Problems - Common connection issues
- WordPress Debugging - Official WordPress debugging guide
- Editing wp-config.php - wp-config.php reference