Technical

How to Read Website Error Logs: Find Problems Before Customers Do

Error logs record what's going wrong behind the scenes — broken forms, missing files, database failures. Here's where to find them and how to understand the most common messages.

In this article · 9 sections
  1. Types of logs
  2. Where to find them on shared hosting
  3. Enable logging without showing errors to visitors
  4. Reading common PHP messages
  5. Fatal error
  6. Warning
  7. Deprecated
  8. Database errors
  9. Memory and time limits
  10. Reading server and access logs
  11. A simple monthly routine
  12. Sharing logs with a developer
  13. Frequently Asked Questions
  14. Is it dangerous to delete the error log?
  15. My error_log file is huge. Is that a problem?
  16. Should I show errors on screen while testing?
  17. Can logs help with SEO?
  18. Need help diagnosing website errors?

When a website breaks, visitors see a blank page, a "500 Internal Server Error" or a form that silently does nothing. The cause is almost always recorded somewhere: in the error logs. Learning to find and read them — even at a basic level — helps you fix problems faster and explain them clearly to your developer.

Types of logs

LogWhat it records
PHP error logFatal errors, warnings and notices from PHP code
Web server error log (Apache/LiteSpeed)Server-level problems: .htaccess errors, permission issues, missing files
Access logEvery request: IP, page, status code, user agent
Database logSlow or failed queries (usually not available on shared hosting)
Application logCustom logs your website writes, such as failed emails or payments

Where to find them on shared hosting

  • Hostinger hPanel: look in the website's Advanced section for error or access logs; PHP error logging can be enabled in PHP Configuration.
  • cPanel: the "Errors" and "Raw Access" or "Metrics" sections.
  • File manager: many hosts write a file named error_log in the folder where the error occurred.

Panel layouts change, so if you can't find logs, ask your host's support where they are for your plan.

Enable logging without showing errors to visitors

On a live website, errors should be logged, not displayed. Displaying errors can reveal file paths and database details to attackers. A typical setting (in PHP configuration or .user.ini):

display_errors = Off
log_errors = On
error_log = /home/username/logs/php_errors.log

Keep the log file outside the public folder, or block it from being downloaded.

Reading common PHP messages

Fatal error

PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect()
in /home/user/public_html/connection.php:5

The script stopped. Here, old mysql_* code is running on a newer PHP version. See upgrading PHP safely.

Warning

PHP Warning: Undefined array key "city" in /home/user/public_html/route.php on line 12

The script continued, but something expected was missing. Often harmless, sometimes the cause of blank sections.

Deprecated

Code uses a feature that will be removed in a future version. Fix it before your next upgrade.

Database errors

mysqli_sql_exception: Unknown column 'source' in 'field list'

The code expects a database column that doesn't exist — a common cause of forms that appear to submit but never save leads.

Memory and time limits

"Allowed memory size exhausted" or "Maximum execution time exceeded" usually point to large uploads, heavy loops or slow external APIs.

Reading server and access logs

  • 500 errors often come from a typo in .htaccess or wrong file permissions.
  • 404 errors in access logs show missing files — broken images, old links, or bots probing for wp-login.php.
  • Many requests from one IP may indicate a bot or attack. See stopping form spam.
  • User agents reveal crawlers such as Googlebot, Bingbot, GPTBot. See AI crawlers.

A simple monthly routine

  1. Open the PHP error log and look at the newest entries.
  2. Group repeated messages — one bug often creates hundreds of lines.
  3. Note the file and line number and send them to your developer.
  4. After fixes, clear or rotate the log so new problems stand out.
  5. Submit a test form and check nothing new appears.

Sharing logs with a developer

When you report a problem, send the exact error line, the date and time, the page you were on and what you clicked. Remove any passwords or personal customer data from the log before sharing it. A precise report can turn a day of guesswork into a ten-minute fix.

Frequently Asked Questions

Is it dangerous to delete the error log?

No, it's just a record. Download it first if you need it for a developer.

My error_log file is huge. Is that a problem?

It means something is repeatedly failing. Fix the cause; large logs can also use up disk space.

Should I show errors on screen while testing?

Only on a staging or local copy, never on the live site.

Can logs help with SEO?

Access logs show how often Googlebot crawls your pages and which URLs return errors — useful for technical SEO.

Need help diagnosing website errors?

Joboo Web troubleshoots and fixes PHP websites. See web development, our maintenance checklist, or contact us.

Share this article

Joboo Web

Web design, SEO & digital marketing team · Ludhiana, Punjab

Joboo Web has helped Indian businesses grow online since 2019 — building fast websites and running SEO, Google Ads and social campaigns for clients in 80+ cities. About us →

Keep reading

💬