You uploaded your shiny new Laravel app to your hosting account, opened the browser, and instead of your website you're greeted with a dreaded 500 Internal Server Error (or just a blank white page). Don't panic — this is one of the most common issues Laravel users face after deployment, and in most cases it's caused by one of just a handful of things.
In this guide, we'll walk through the real reasons this happens and give you clear, step-by-step fixes you can apply directly from cPanel and the File Manager — no advanced Linux knowledge required.
Why Does Laravel Show a 500 Error?
Laravel is a powerful framework, but it's a little pickier than a simple PHP script or WordPress site. A 500 error simply means "something went wrong on the server," and for Laravel it usually comes down to one of these causes:
- Wrong file or folder permissions (especially on
storageandbootstrap/cache). - A missing or misconfigured
.envfile. - Missing application key.
- Wrong PHP version for your Laravel release.
- Corrupted or outdated cache files.
- Missing
vendorfolder (Composer dependencies not uploaded).
Pro Tip: Before anything else, turn on debug mode temporarily so you can see the actual error message instead of a generic 500. We'll show you how in the next section.
Step 1: Turn On Debug Mode to See the Real Error
A blank 500 page hides the true cause. Let's reveal it safely.
- Log in to your cPanel account.
- Open File Manager and navigate to your Laravel project's root folder.
- Find the file named
.env. (If you don't see it, click Settings in the top-right of File Manager and enable Show Hidden Files.) - Right-click
.envand choose Edit. - Find the line
APP_DEBUG=falseand change it toAPP_DEBUG=true. - Save and reload your website.
Now Laravel will show you a detailed error page pointing to the exact problem. Once you've fixed everything, remember to set APP_DEBUG=false again for security.
Step 2: Fix File and Folder Permissions
This is the number-one cause of 500 errors. Laravel needs to write to two folders: storage and bootstrap/cache. If these aren't writable, Laravel crashes instantly.
- In File Manager, right-click the
storagefolder and choose Change Permissions. - Set the permission to
755(or775if 755 doesn't work on your setup). - Make sure the box to apply to all subfolders/files is checked so it cascades through the whole folder.
- Repeat the same for the
bootstrap/cachefolder.
Important: Never set folders to777unless it's a last-resort test — it's a security risk. On Hostiso's cPanel servers,755for folders and644for files is the safe standard.
Step 3: Check Your .env File and App Key
If your .env file is missing or the application key is empty, Laravel will fail to boot.
Make sure .env exists
Many deployments accidentally leave out the hidden .env file. If it's missing, copy the example file:
- In File Manager, look for
.env.example. - Right-click it, choose Copy, and name the copy
.env. - Edit it and fill in your database name, username, and password.
Generate the App Key
Check the .env for a line like APP_KEY=. If it's empty, your site won't run. If you have SSH access (available on our Cloud VPS plans), run:
php artisan key:generateNo SSH? No problem. You can generate a valid key another way: create a small PHP file in your public folder with the following, load it once in your browser, then copy the result into .env:
<?php echo 'base64:'.base64_encode(random_bytes(32));Your .env line should look like APP_KEY=base64:xxxxxxxxxxxxxxxxx. Delete that PHP file afterward.
Step 4: Set the Correct PHP Version
Laravel versions require specific PHP versions. For example, Laravel 10 and 11 need PHP 8.1+. Running an older PHP version is a frequent cause of 500 errors.
- In cPanel, open Select PHP Version (sometimes called MultiPHP Manager).
- Choose the PHP version your Laravel release requires (usually
8.1,8.2, or8.3). - While you're there, make sure these extensions are enabled:
mbstring,openssl,pdo,tokenizer,ctype,json, andbcmath. - Save and reload your site.
Pro Tip: On Hostiso Shared Hosting you can switch PHP versions with a single click and toggle extensions on or off — no support ticket needed. If you get stuck, our 24/7 team is one click away.
Step 5: Clear Laravel's Cache
Sometimes Laravel caches old config or route data that no longer matches your live server, causing errors. Clearing the cache fixes this.
If you have SSH access, the cleanest way is:
php artisan config:clear
php artisan cache:clear
php artisan route:clear
php artisan view:clearIf you don't have SSH, you can clear it manually through File Manager:
- Navigate to
bootstrap/cacheand deleteconfig.phpandroutes.phpif they exist (Laravel will rebuild them). - Go to
storage/framework/viewsand delete the compiled.phpfiles inside.
Step 6: Make Sure the Vendor Folder Was Uploaded
If you developed locally and uploaded via FTP, it's easy to accidentally skip the huge vendor folder, which contains all of Laravel's core code. Without it, nothing works.
- Check that a
vendorfolder exists in your project root and is not empty. - If it's missing, either re-upload it or run
composer installvia SSH.
Bonus: Point Your Domain to the public Folder
Laravel is meant to serve from the public folder, not the project root. On shared hosting, the easiest approach is to place your app files outside public_html and move the contents of Laravel's public folder into public_html, then update the paths in public_html/index.php:
require __DIR__.'/../your-laravel-app/vendor/autoload.php';
$app = require_once __DIR__.'/../your-laravel-app/bootstrap/app.php';This keeps sensitive files (like .env) safely outside the public web root.
Frequently Asked Questions
I fixed everything but still see a blank white screen. What now?
A blank page usually means debug is off and there's still a fatal error. Set APP_DEBUG=true in .env, reload the page to read the real message, and also check storage/logs/laravel.log in File Manager for detailed clues.
Is it safe to leave APP_DEBUG=true?
No. Debug mode exposes sensitive details like database credentials and file paths to visitors. Always switch it back to false once your site is working correctly.
Do I need a VPS to run Laravel?
Not at all. Laravel runs perfectly on our Shared Hosting with fast NVMe storage, Composer, and one-click PHP version switching. For larger apps that need SSH, queues, or custom services, a Cloud VPS gives you full control.
Still Stuck?
Most Laravel 500 errors trace back to permissions, a missing .env, the wrong PHP version, or stale cache — and now you know how to fix all four. If you've worked through these steps and your app still won't load, Hostiso's 24/7 support team is happy to check your account and help you get back online fast.