Skip to content

Step 10 of 10

Fix common Laravel errors on shared hosting

A generic error page tells you nothing, but the logs do. Start there, then use the list below.

Read the logs first

  • storage/logs/laravel.log, or laravel-YYYY-MM-DD.log with the daily channel: errors inside Laravel.
  • cPanel → Errors, or error_log in the web root: problems before Laravel starts, such as a bad .htaccess.

Logs get long fast. The Laravel log analyzer groups repeats, shows what happens most, and links to fixes. Your log stays in your browser.

Common errors

  • 500 Server Error: read the log. The usual causes are missing vendor/, a wrong .env, no APP_KEY, or a stale cache in bootstrap/cache/.
  • 403 Forbidden: file permissions, the document root, or a ModSecurity rule blocking a form. The host's error log names the rule.
  • 404 on every page but the home page: .htaccess is missing. See .htaccess and HTTPS.
  • 419 Page Expired: session cookies aren't saved. Check SESSION_DOMAIN, SESSION_SECURE_COOKIE and the sessions table.
  • 508 Resource Limit: you hit your account's limits. Check cPanel → Resource Usage, and block bad bots.
  • Composer says PHP is too old: the Terminal or cron is using another PHP version. See cron and the scheduler.
  • Pages without styles: public/build wasn't uploaded, or APP_URL is wrong.
  • Images give a 404: see Fix storage:link.

See the error safely

Avoid APP_DEBUG=true on a live site. If the log shows nothing, turn it on for a minute only while you test, then turn it off and clear the config cache.

Frequently asked questions

Where is the Laravel log on cPanel?

In storage/logs/ inside your project folder, such as /home/cpaneluser/laravel-app/storage/logs/laravel.log. Download it from File Manager.

My site shows a blank white page. Why?

PHP stopped before Laravel could show an error, usually from a wrong PHP version or memory limit. Check error_log and cPanel → Errors.

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.