๐Ÿ”น Logs & Debugging

๐Ÿ”น Logs & Debugging

Logs help identify whatโ€™s breaking your website, emails, or applications. They are essential for troubleshooting errors, performance issues, and security problems.

๐Ÿ“„ Error Logs in Plesk

Error logs record server-side issues such as PHP errors, permission problems, and failed scripts.

How to Access Error Logs in Plesk

  1. Log in to Plesk

  2. Go to Websites & Domains

  3. Select your domain

  4. Click Logs

Common Errors Youโ€™ll See

  • PHP fatal errors

  • File permission issues (403, 500 errors)

  • Missing files or incorrect paths

  • Plugin or theme conflicts

๐Ÿ“Œ Tip: Always check the latest timestamp to find the most recent issue.

๐Ÿž WordPress Debug Mode

WordPress debug mode helps identify errors caused by themes, plugins, or custom code.

How to Enable Debug Mode

  1. Open wp-config.php

  2. Add or update the following lines:

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

Where Debug Logs Are Stored

  • /wp-content/debug.log

When to Use

  • White screen of death

  • Plugin/theme errors

  • Admin panel issues

โš ๏ธ Important: Disable debug mode after troubleshooting to avoid exposing sensitive information.

๐Ÿ“Š Access Logs Explained

Access logs record every request made to your website.

What Access Logs Show

  • Visitor IP addresses

  • Requested URLs

  • HTTP status codes (200, 404, 403)

  • User agents (browser/device)

  • Request time and load duration

Why Access Logs Matter

  • Identify broken links (404 errors)

  • Detect unusual or malicious traffic

  • Analyze traffic patterns

  • Debug redirect issues

๐Ÿ“Œ Example Use Case:
If users report missing pages, access logs can confirm whether the page exists or returns a 404 error.

โœ… Best Practices for Log Analysis

  • Always check logs immediately after an error occurs

  • Clear logs periodically to avoid clutter

  • Share error logs with support when opening a ticket

  • Avoid editing files directly without checking logs first