Knowledge Base

Viewing error and access logs

Logs record what happens on your website. They're the first place to look when something isn't working.

Log What it records
Access (usage) log Every request to your website: the page, the visitor's IP address, the time and the result
Error log Errors from the web server and PHP, such as missing files, permission problems and script errors

Viewing your logs

  1. Log in to DirectAdmin.
  2. Go to System Info & Files and click Site Summary / Statistics / Logs.
  3. Find your domain and open its logs.
  4. Choose the usage (access) log or the error log. You can view the latest lines or the full log.

Logs are archived monthly in the domain's logs folder, which you can open in File Manager.

Common errors

Error Usual cause
403 Forbidden Wrong file permissions, a missing home page file or a blocked IP address
404 Not Found The file doesn't exist or a link or redirect points to the wrong address
500 Internal Server Error A mistake in .htaccess, a PHP error or a plugin problem
503 or 508 Your account reached a resource limit. See Understanding your resource limits.

WordPress errors

WordPress can also log its own errors. Add these lines to wp-config.php, above the line that says "That's all, stop editing":

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

Errors are then saved to wp-content/debug.log. Set WP_DEBUG back to false when you've finished and delete the log file.

Please rate this article to help us improve our Knowledge Base.

0 0