Accessing Your Website Error Logs
Accessing Your Website Error Logs
Error logs record problems that occur on your website, including PHP errors, failed database connections, and plugin issues. When something goes wrong on your site, the error log is often the fastest way to identify the cause.
Accessing Logs via File Manager or SFTP
KPanel does not have a dedicated Logs tab. Log files are stored on the server and can be accessed via the File Manager or SFTP.
Using the File Manager:
- Log in to KPanel at kpanel.kapsulecloud.com
- Go to Websites and select the affected site
- Click Files → File Manager
- Navigate to the
logs/directory in your site root
Using SFTP:
- Go to Files → SFTP in KPanel for your site's connection details
- Connect with FileZilla or your preferred SFTP client
- Navigate to the
logs/directory in your site root
The logs/ directory contains:
- PHP error log, errors generated by PHP code (the most commonly needed log)
- Access log, a record of all HTTP requests to your site
- Error log, server-level errors (500, 502, etc.)
Reading a PHP Error Log
A typical PHP error log entry looks like:
[03-Jun-2026 14:32:11 UTC] PHP Fatal error: Call to undefined function get_header() in /var/www/sites/yourdomain/public_html/wp-content/themes/mytheme/page.php on line 8
This tells you the date and time, the error type, a description of the problem, and the file path and line number where the error occurred.
Common Error Types
| Type | Severity | What It Means |
|---|---|---|
| Fatal error | High | Execution stopped. Page will not load. |
| Warning | Medium | Something unexpected happened but execution continued. |
| Notice | Low | Minor issue, usually a coding best practice violation. |
| Deprecated | Low | A function being used will be removed in a future PHP version. |
Enabling WordPress Debug Mode
For WordPress sites, enabling debug mode outputs more detailed error information:
- Connect via SFTP or use the File Manager in KPanel
- Open
wp-config.phpin the WordPress root - Add or update these lines:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Errors will be written to wp-content/debug.log rather than displayed on-screen.
Do not leave WP_DEBUG_DISPLAY set to true on a live site, as this can expose sensitive information to visitors.
Check error logs immediately after updating WordPress, plugins, or themes. Many post-update issues leave clear traces in the PHP error log.
