Error logs are essential for troubleshooting website issues. In this guide, we explain how to view and analyze error logs in DirectAdmin.

What are error logs?

Error logs are files in which the server records all errors that occur while running your website. They are indispensable for troubleshooting and contain information about:

  • PHP errors and warnings
  • Apache web server errors
  • Access issues (403, 404, 500 errors)
  • Database connection problems
  • Security incidents

Why are error logs important?

Without error logs, it is nearly impossible to determine the cause of website issues. They tell you exactly where and when something went wrong, allowing you to troubleshoot effectively instead of guessing.

Viewing error logs

Via DirectAdmin

  1. Log in to DirectAdmin
  2. Go to Error Logs or Site Logs in the menu
  3. Select the type of log:
    • Error Log: Errors from the web server
    • Access Log: All visitors and requests
  4. You will see the latest lines of the log file

Via File Manager

Logs are located in the logs folder of your domain:

  • error.log - All error messages
  • access.log - Access log with all requests

Via FTP or SSH

Download the logs for analysis in a text editor, or view them directly via SSH with commands like tail -f error.log for real-time monitoring.

Understanding error log structure

Typical PHP error message

[14-Jan-2026 10:30:45] PHP Fatal error: Uncaught Error:
Call to undefined function example() in /home/user/domains/site.nl/public_html/file.php:25

Components explained:

  • Date/time: When the error occurred (January 14, 2026, at 10:30)
  • Type: Fatal error (critical error that stops the page)
  • Message: Specific error description (function does not exist)
  • Location: Exact file and line number (file.php, line 25)

HTTP status codes in logs

Code Meaning Common cause Solution
403 Access denied Incorrect permissions Check CHMOD (644/755)
404 Not found Incorrect URL or missing file Check paths
500 Internal server error PHP error or config problem Check error.log for details
502 Bad Gateway Server overloaded Wait or optimize
503 Service unavailable Maintenance or resource limit Check server status

Common errors and solutions

PHP Fatal error: Memory exhausted

PHP Fatal error: Allowed memory size of 134217728 bytes exhausted

Cause: Your script is using more memory than allowed.
Solution: Increase memory_limit in PHP settings via DirectAdmin or add to .htaccess: php_value memory_limit 256M

File not found

File does not exist: /home/user/domains/site.nl/public_html/favicon.ico

Cause: A file is being requested that does not exist.
Solution: Upload the missing file or add a redirect. For favicon: upload a favicon.ico to your root.

Permission denied

[error] [client IP] Permission denied: /path/to/file

Cause: Incorrect file permissions.
Solution: Set files to CHMOD 644 and folders to 755. Never use 777 unless absolutely necessary.

PHP Parse error (syntax error)

PHP Parse error: syntax error, unexpected '}' in file.php on line 45

Cause: Typo or syntax error in your PHP code.
Solution: Open the mentioned file, go to the indicated line, and fix the syntax. Watch for missing semicolons, brackets, or quotes.

Database connection error

Warning: mysqli_connect(): Access denied for user

Cause: Incorrect database credentials.
Solution: Check username, password, and database name in your configuration file (wp-config.php for WordPress).

Tips for effective debugging

  1. Check the timestamp: Focus on recent errors that are relevant to your current issue
  2. Look for patterns: The same error repeatedly indicates a structural problem
  3. Start from the bottom: The newest errors are at the bottom of the log file
  4. Note file and line: This information points you directly to the cause
  5. Google the exact error: Most errors have already been solved and documented by others
  6. Reproduce the problem: Test the action that causes the error while viewing the logs

Managing error logs

Clearing logs

Logs can grow quickly, especially on busy websites. To save space:

  1. Go to File Manager
  2. Navigate to the logs folder
  3. Open error.log
  4. Remove old lines (keep recent ones for analysis)
  5. Save the file

Automatic rotation

Request support to set up log rotation so that logs are automatically archived and space is saved.

WordPress debug mode

For more detailed PHP errors in WordPress, activate debug mode:

// Add to wp-config.php
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

Logs will then appear in /wp-content/debug.log. Remember to disable debug on production sites.

Need help?

We are here for you! Are you facing any issues or have questions? Our support team is happy to assist you personally. Send us a message via the ticket system - we usually respond within a few hours and are eager to help.