Contents
You get one of two pages: Laravel’s plain grey 500 | Server Error, or the browser’s This page isn't working with HTTP ERROR 500. The first means Laravel started and then failed; the second usually means it never started. Either way, do not guess: the cause is one line in a log, and this page takes you from that line to the fix.
Step one: read the log
- Open File Manager, go to
storage/logs/laravel.login your project and scroll to the end. Look for the line starting withproduction.ERROR:. - If the file is empty or missing, open Metrics → Errors in cPanel and look for an
error_logfile insidepublicorpublic_html. - Or ask the assistant to read the log for you (see the end of this page).
Then match the line:
| What the log says | Section |
|---|---|
vendor/autoload.php: Failed to open stream |
1 |
Composer detected issues in your platform or syntax error, unexpected |
2 |
No application encryption key has been specified |
3 |
laravel.log could not be opened or Permission denied |
4 |
SQLSTATE[HY000] [1045], [2002] or Table '...sessions' doesn't exist |
5 |
A path from your computer such as C:\xampp or /Users/ |
6 |
Vite manifest not found |
7 |
Causes and fixes
1. The vendor folder is missing
vendor holds Laravel’s libraries and is normally not pushed to GitHub. Over SSH, run inside the project:
composer install --no-dev --optimize-autoloader
Without SSH, run the same command on your computer and upload vendor with the project. See Laravel on cPanel without SSH.
2. PHP is older than the project needs
A message like Your Composer dependencies require a PHP version ">= 8.2.0". You are running 8.1.x is explicit: Laravel 11 and later need PHP 8.2 or newer. Open MultiPHP Manager in cPanel, select the domain, pick the version and click Apply. In Select PHP Version, enable the extensions the project needs, such as pdo_mysql, mbstring, intl and fileinfo. could not find driver means pdo_mysql is off.
3. .env is missing or has no APP_KEY
.env is not deployed by Git and is hidden in File Manager because it starts with a dot. Enable Show Hidden Files and check it sits in the project root, not in public. For the key message, follow No application encryption key. If the file exists but its values are not picked up, see .env not loaded.
4. Laravel cannot write to storage
The most common cause when laravel.log itself cannot be written. The full fix, with and without commands, is in Laravel 500 from storage permissions.
5. Database details
On cPanel the database and user names carry your account prefix, like myuser_shop, and DB_HOST=localhost is usual. Fix the values in .env as in create a MySQL database, and see error 1045 and error 2002. Laravel 11 stores sessions and cache in the database by default, so if the log mentions a sessions or cache table, run php artisan migrate --force or import the tables in phpMyAdmin.
6. A config cache uploaded from your computer
bootstrap/cache/config.php stores your computer’s paths and settings. Delete config.php, routes-v7.php, services.php and packages.php from bootstrap/cache, or run php artisan optimize:clear over SSH.
7. Vite assets not built
If the log mentions manifest.json, follow Vite manifest not found.
The document root comes before all of this
The domain’s Document Root must point to the project’s public folder, not its root. Open Domains in cPanel and set Document Root to something like myapp/public. If you get a file list or a 403 instead of a 500, this is the cause; see Index of listing.
How to confirm it is fixed
Reload. If the error changes into a different one, you have moved a step forward: read the log again. Once the site works, make sure .env has APP_ENV=production and APP_DEBUG=false, and test the login page and a form that saves to the database.
How to avoid it
Keep a fixed deploy checklist: composer install --no-dev, a production .env, php artisan migrate --force, npm run build, then php artisan optimize. The Laravel deployment guide covers each step.
On ArabyHost
Ask the Araby AI assistant in the panel to read the error log: it explains the line that stopped the app and the fix it suggests. You choose PHP 8.1 to 8.3 yourself, and LiteSpeed reads the .htaccess that ships with Laravel in public. AI/Developer plans include SSH jailed in CageFS with Composer and Git for artisan commands; on other plans you work from File Manager. More in Laravel hosting.
FAQ
Where do I find the cause if the page shows nothing?
In storage/logs/laravel.log inside the project, under Metrics then Errors in cPanel, and in the error_log file inside the public folder. If laravel.log is empty or missing, the problem happens before Laravel starts: vendor, PHP version or permissions.
Should I set APP_DEBUG=true to see the error?
Only for a few minutes, then set it back to false: the debug page shows visitors your passwords and .env keys. Reading the log is better and changes nothing.
Can I deploy Laravel without SSH and Composer?
Yes. Run composer install --no-dev on your computer with the same PHP version as the hosting, then upload the project including vendor as a ZIP. The steps are in the guide to deploying Laravel on cPanel without SSH.
The home page works but other links give 404. Is that the same error?
No. That is a URL rewriting problem with the .htaccess file in public, covered on its own page: every Laravel route returns 404 except the home page.