Shared hosting is where most Laravel apps go live first. It is cheap, it comes with cPanel, and it hides one nasty fact: Laravel was built for a server you control, and shared hosting is not that server. I have watched the same five mistakes break deployments over and over. Each one looks like a different error on screen, but the cause is always one of these.

1. Putting the whole project inside public_html

This is the most dangerous one. Shared hosting serves everything in public_html/ to the internet. Upload your full Laravel project there and anyone can open yourdomain.com/.env and read your database password, app key and mail credentials.

Fix: keep the project in a folder next to public_html — for example /home/username/laravel-app/ — and expose only the contents of Laravel's public/ folder. Point the domain at public/ with a document-root change, or forward requests there with one .htaccess rule. The app key and .env file never become reachable from a browser.

2. Leaving APP_DEBUG on

With debug on, a visitor who triggers an error sees your database password and file paths printed on the page. It is meant for your laptop, never for production.

Fix: set APP_DEBUG=false and APP_ENV=production in the server's .env before the site goes live. When something does break, read the real error in storage/logs/laravel.log instead of on screen.

3. Editing .env and wondering why nothing changed

You fix the database password in .env, refresh the page, and the app still uses the old one. The cause is php artisan config:cache: once the config is cached, Laravel stops reading .env entirely.

Fix: re-run config:cache after every .env change on the server. If you have no SSH, run it through a one-off cron job and delete the job afterwards. This single habit removes a whole class of "but I changed it!" confusion.

4. Uploads that 404 even though the files exist

A user uploads a profile picture, the file lands in storage/app/public, and the browser gets a 404. The file is there — the public link to it is not.

Fix: run php artisan storage:link. It creates the symlink from public/storage to the storage folder. No SSH? Same one-off cron trick as the migrations.

5. Trying to run migrations with no terminal

Shared hosting plans without SSH leave you staring at a database with no tables and no way to run php artisan migrate.

Fix: add a one-off cron job that runs once, a minute from now: cd /home/username/laravel-app && /usr/bin/php artisan migrate --force. Check phpMyAdmin, confirm the tables appeared, then delete the cron job. The --force flag matters — Artisan refuses to migrate in production without it.

The pattern

Four of these five mistakes have the same root cause: treating shared hosting like your local machine. The server is not your laptop. Files live in different places, the terminal may not exist, and anything you leave in the web root is public. Respect those three facts and a Laravel app runs happily on a three-dollar hosting plan.

I wrote the full step-by-step version of this deployment — preparing the project, the folder layout, the database, migrations without SSH, and a table of every common error with its fix — here: https://rajadevsolutions.online/blog/how-to-deploy-laravel-13-app-on-shared-hosting