Laravel error

Updated 11 October 2026

Short answer

A Laravel site in production shows a plain "Server Error" page, which is correct: Laravel's docs say APP_DEBUG must be false in production, or you risk exposing sensitive details. The real error is in the log file, by default storage/logs/laravel.log. The usual causes are .env settings (database, keys), cached config that's out of date, folder permissions on storage and bootstrap/cache, or a database migration that didn't run.

What's the problem

Your Laravel app shows "500 Server Error", "419 Page Expired", a blank page, or a database error.

Why it happens

  • .env settings: wrong database details, or a missing APP_KEY.
  • Stale cache: config or routes cached before a change.
  • Permissions: the web server can't write to storage or bootstrap/cache.
  • Missed migrations on the production database.
  • Session or CSRF problems (419 errors), often cookies or session settings.
  • Composer dependencies not installed or out of date.

How to fix it

  1. Read storage/logs/laravel.log for the latest error and its stack trace.
  2. Check .env on the server: database details and APP_KEY.
  3. Clear and rebuild caches (php artisan config:clear, then cache again if you use caching).
  4. Fix permissions on storage and bootstrap/cache.
  5. Run migrations on production if new ones exist.
  6. Never turn on APP_DEBUG on a public production site.

What Preventionlabs checks

One click runs the full report on your domain. For this problem it shows whether your site loads, how fast, and where its redirects go; up to 50 pages from your sitemap, listing any that fail or are slow, plus broken links on them. With Cloudflare connected, it also shows which pages returned server errors (5xx) to visitors, and when; recent deploys and account changes, with their times. It doesn't read your server logs, so the exact error message is in your host's logs.

Run your free report

Your first report is free, no card needed. Then A$50 a month, up to 10 domains. Read-only: it never changes anything.

Sources

  1. Laravel: Error Handlingofficial docsIn your production environment, the value of APP_DEBUG should always be false .
  2. Laravel: Loggingofficial docs'path' => storage_path('logs/laravel.log'),

Preventionlabs is independent and not affiliated with Laravel. Product names are used only to describe the problem.

← All of Frameworks