UnderHost
Knowledgebase Docs

How to check error logs in DirectAdmin

Find PHP and web server error logs in DirectAdmin to diagnose 500 errors, broken scripts, WordPress plugin failures, and other site issues.

On this page

Error logs are the most important diagnostic tool when something goes wrong with your website. DirectAdmin stores error logs per domain in a standard location accessible through the File Manager or FTP.

Where to find error logs

In DirectAdmin, error logs are typically stored in the domain's log directory:

domains/yourdomain.com/logs/error.log
domains/yourdomain.com/logs/bytes_log
domains/yourdomain.com/logs/access.log

To view them:

  1. Log in to DirectAdmin and open File Manager
  2. Navigate to domains/yourdomain.com/logs/
  3. Click error.log to view it in the browser (or download it for easier reading in a text editor)

If the logs folder does not exist or is empty, the domain may be using a different log path. Some DirectAdmin configurations store logs at:

/var/log/apache2/domains/yourdomain.com.error.log

If you cannot locate the log files, contact support-they can confirm the correct path on your specific server.

Reading error log entries

Each line in the error log shows:

[Mon Jun 03 14:22:05 2026] [error] [client 1.2.3.4] PHP Fatal error: Uncaught Error: Call to undefined function in /home/user/domains/example.com/public_html/plugin.php on line 142

Key parts to read:

PartMeaning
Date/timeWhen the error occurred
Error levelPHP Fatal error, Warning, Notice, etc.
MessageWhat went wrong
File pathWhich file caused the error
Line numberExact line in the file to inspect

PHP Fatal error is the most serious-it stops page execution and often causes a 500 error or blank page. PHP Warning and Notice are less severe and usually do not break the page.

Enable PHP error logging

If the error log is empty but your site is showing errors, PHP logging may be disabled. Add these lines to a php.ini file or .htaccess in your document root:

Via .htaccess (suPHP / Apache module):

php_flag log_errors On
php_flag display_errors Off
php_value error_log /home/username/domains/yourdomain.com/logs/php_error.log

Via php.ini (FastCGI / PHP-FPM):

log_errors = On
display_errors = Off
error_log = /home/username/domains/yourdomain.com/logs/php_error.log

Set display_errors = Off on production sites-never display raw PHP errors to visitors as they can expose server paths and code details.

Access logs

The access log (access.log) records every HTTP request to your site: IP address, timestamp, URL, HTTP status code, and bytes transferred. Use it to:

  • Find which URLs are returning 404 or 500 errors
  • Identify unexpected traffic spikes or bot crawling
  • Check the exact time an error occurred

Access logs can grow large on busy sites. Download and compress them periodically to manage disk space.

Related: DirectAdmin File Manager | 500 Internal Server Error | WordPress 500 error | cPanel error logs

Was this article helpful?

Need DirectAdmin hosting?

DirectAdmin is available for customers who want a lightweight hosting control panel on compatible UnderHost services.

Related articles

Back to DirectAdmin