๐น 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
-
Log in to Plesk
-
Go to Websites & Domains
-
Select your domain
-
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
-
Open
wp-config.php -
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