Skip to content

5xx Server errors

500 Internal Server Error

Something failed on the server while handling the request. The real error is in the log, not on the page.

Common causes

  • An uncaught exception in the app (a bug, a missing class, a database error).
  • Missing vendor/ files or a PHP version lower than the code needs.
  • A broken .htaccess line, or wrong permissions on storage/ and bootstrap/cache/.
  • A missing APP_KEY or a stale config cache after a deploy.

How to fix a 500 error

  1. 1

    Read storage/logs/laravel.log (and the cPanel error log for .htaccess or PHP problems).

  2. 2

    Run composer install (or upload vendor/), check the PHP version in cPanel → MultiPHP Manager.

  3. 3

    chmod -R 775 storage bootstrap/cache; then php artisan optimize:clear.

  4. 4

    Turn APP_DEBUG on only briefly on a private copy to see the full error.

In Laravel

Laravel logs every 500 in storage/logs/laravel.log with the stack trace. With APP_DEBUG=false visitors only see your errors/500 page.

Check the status of a URL

The first line of the response shows the status code; -L follows redirects and shows each step.

curl -I https://example.com/page
curl -IL https://example.com/old-page

Frequently asked questions

What does HTTP 500 mean?

Something failed on the server while handling the request. The real error is in the log, not on the page.

How do I fix a 500 error?

Read storage/logs/laravel.log (and the cPanel error log for .htaccess or PHP problems). Run composer install (or upload vendor/), check the PHP version in cPanel → MultiPHP Manager. chmod -R 775 storage bootstrap/cache; then php artisan optimize:clear. Turn APP_DEBUG on only briefly on a private copy to see the full error.

How does Laravel handle 500?

Laravel logs every 500 in storage/logs/laravel.log with the stack trace. With APP_DEBUG=false visitors only see your errors/500 page.

Get new articles in your inbox

Practical tutorials and deep dives, about once a week. No spam, unsubscribe anytime.

Privacy policy

Add DEV Talk to your Home Screen

  1. 1 Tap the Share button in Safari's toolbar.
  2. 2 Scroll down and tap Add to Home Screen.
  3. 3 Tap Add. Open it from the Home Screen to read like an app and to turn on notifications with the bell.

We use cookies to improve your experience and analyze traffic. By continuing, you agree to our Privacy Policy.