Knowledge

500 Internal Server Error in Laravel

#Laravel

A 500 error is a generic "something broke" on the server. The error itself tells you nothing, the real message is in your logs. Here is where to look and the usual culprits.

Published by Mark van Eijk on June 23, 2026 · 1 minute read

  1. About error 500
  2. Where to look first
  3. Common causes
  4. Solution
  5. Temporarily see the real error
  6. Clear stale caches
  7. Re-cache for production

About error 500

A 500 Internal Server Error means the server hit an unhandled error while processing the request. It's deliberately generic: in production Laravel hides the details so it doesn't leak sensitive information to visitors. The actual cause is always written somewhere you can read.

Where to look first

Don't guess, read the log. For Laravel:

tail -n 100 storage/logs/laravel.log

If nothing's there, the error happened before Laravel booted, so check the web server and PHP-FPM logs:

tail -n 100 /var/log/nginx/error.log
tail -n 100 /var/log/php8.3-fpm.log

See logging in Laravel for configuring where these go.

Common causes

Solution

Temporarily see the real error

On a staging or local environment, enable debug mode to render the actual exception instead of the generic page:

APP_DEBUG=true

Never leave APP_DEBUG=true on in production, it exposes stack traces, environment values and database details to the public. Turn it back off the moment you've found the cause.

Clear stale caches

A frequent cause right after deploy is a cached config or view pointing at something stale:

php artisan optimize:clear

This clears the config, route, view and event caches in one go, see clearing the cache in Laravel.

Re-cache for production

Once it works, rebuild the caches for performance:

php artisan config:cache
php artisan route:cache

Subscribe to our newsletter

Do you want to receive regular updates with fresh and exclusive content to learn more about web development, hosting, security and performance? Subscribe now!

Related articles

How to use different PHP versions with Laravel Valet

A 500 error is a generic "something broke" on the server. The error itself tells you nothing, the real message is in your logs. Here is where to look and the usual culprits.

Read more →

Disable cookies in Laravel

A 500 error is a generic "something broke" on the server. The error itself tells you nothing, the real message is in your logs. Here is where to look and the usual culprits.

Read more →