Why Laravel Doesn't Work on "Normal" Hosting
Laravel is the most popular PHP framework — but also the most misunderstood when it comes to deployment. Many developers finish their first project and face the question: "where do I put this?" The answer they often find is a $5/month shared hosting plan.
The result: white screen, 500 errors, "artisan not found," or a scheduler that never fires.
The reason is simple: Laravel is not a flat PHP script. It doesn't work with an FTP upload like WordPress. Laravel requires specific infrastructure conditions to run properly.
What Laravel Actually Needs to Run
Minimum requirements to run a Laravel application reliably in production:
| Requirement | Why | Shared Hosting | PaaS |
|---|---|---|---|
| PHP 8.2+ | Laravel 11 requires minimum PHP 8.2 | Usually outdated version | Auto-detected |
| Composer | Dependency management (vendor/) | Can't run without SSH | Automatic in build step |
| Artisan CLI | Migrations, seeds, cache, config | No access or restricted | Runs as deploy hook |
| Queue Worker | Mail, notifications, long jobs | Not possible | Separate worker process |
| Task Scheduler | schedule:run every minute | cPanel cron — unreliable | Platform scheduler |
| Writable Storage | Cache, session, log files | Permission issues | Auto-configured |
| SSL / HTTPS | Security, SEO, cookie safety | Paid or manual setup | Automatic Let's Encrypt |
| Environment Variables | Secure .env management | Exposed file via FTP | Encrypted secret store |
As this table shows, shared hosting failing with Laravel isn't a "configuration mistake" — it's an architectural mismatch. Laravel is a modern framework and requires modern infrastructure.
Real Problems on Shared Hosting
If you've tried deploying Laravel on shared hosting, you've likely encountered one or more of these issues:
- "Class not found" errors: Autoload files are missing because
composer installcouldn't run. - 500 Internal Server Error: The
.envfile isn't in the right place orAPP_KEYwas never generated. - Public folder problem: Document root can't be set to
/public; you need.htaccesshacks. - Permission denied:
storage/andbootstrap/cache/aren't writable. - Queue doesn't work:
php artisan queue:workrequires a persistent process — shared hosting doesn't allow this. - Scheduler is dead: Even if cPanel cron supports
* * * * * php artisan schedule:run, path issues and timeouts make it unreliable. - Can't run migrations: Without SSH, there's no way to execute
php artisan migrate.
These aren't bugs. Shared hosting was designed for 2005-era static PHP sites. Laravel is a 2024 application framework. The architectural philosophy doesn't match.
The VPS/VDS Path: Powerful But Demanding
Developers who understand shared hosting's limitations typically move to VPS/VDS. This is the right direction — but comes with its own challenges:
- Ubuntu/Debian installation and update policy
- Nginx or Apache configuration (
try_files, PHP-FPM socket) - PHP 8.2+ installation (ondrej/php PPA or source compilation)
- Global Composer installation
- PostgreSQL or MySQL setup, user creation, firewall
- SSL certificate (Certbot + cron renewal)
- Git deploy strategy (bare repo + post-receive hook or CI/CD)
- Supervisor setup (daemonize queue worker)
- Cron job (
schedule:runevery minute) - Log rotation, disk monitoring, security patches
Each of these 10 steps requires separate expertise. Say you get the initial setup done — what about updates? PHP version upgrades? What happens when the disk fills up? Will Supervisor auto-restart after a server reboot?
VPS gives you control but also gives you responsibility. If system administration isn't your job, that responsibility eats into the time you'd spend building your product.
The PaaS Path: Write Code, Push, It Works
PaaS (Platform as a Service) automatically configures everything Laravel needs — PHP version, Composer, queue workers, scheduler, SSL, database. You just write code.
Here's how a typical Laravel deploy works on a PaaS:
- Git push: You push code to the
mainbranch. - Framework detection: The platform sees
composer.jsonand theartisanfile, identifies it as Laravel. - Build:
composer install --no-dev --optimize-autoloaderruns. Ifpackage.jsonexists,npm run buildis triggered automatically. - Deploy hooks:
php artisan migrate --force,php artisan config:cache,php artisan route:cacherun automatically. - Worker start: Queue worker spins up as a separate process.
- Scheduler active:
schedule:runis triggered every minute by the platform. - SSL and domain: Automatic Let's Encrypt certificate; custom domain binding is a single DNS record.
- Health check: The old version stays live until the new one returns
200 OK(zero-downtime).
All these steps repeat automatically on every push. No CI/CD pipeline configuration, no Supervisor config, no cron editing.
What to Look for in Laravel Hosting
Regardless of which hosting path you choose, check these criteria for a Laravel application:
- PHP version: Minimum 8.2 for Laravel 11, minimum 8.1 for Laravel 10. Don't use a platform where you can't control the PHP version.
- Composer support:
composer installmust run during build. If the answer is "upload the vendor folder via FTP," switch providers. - Artisan access: Commands like migrate, seed, cache clear, and key generate must be executable.
- Queue worker:
queue:workmust run as a daemon (persistent process). If "run queue:work via cron" is suggested, it won't work reliably. - Scheduler:
schedule:runmust trigger every minute. Ideal if the platform provides this built-in. - Zero-downtime deploy: The old version should continue serving traffic while the new version deploys.
- Environment variables:
.envvalues must be stored securely (encrypted), never committed to git. - PostgreSQL or MySQL: Managed database (automatic backups, connection pooling) is a major advantage.
- Log access: Real-time access to
storage/logsor stdout logs is essential.
Deploy Steps on Skyversal
As a concrete example, here's what it takes to deploy a Laravel project on Skyversal:
- Create a project: In the panel, "New Project" → select your GitHub repo.
- Framework auto-detected:
composer.json+artisan→ recognized as Laravel. - Enter environment variables: Add
APP_KEY,DB_*,MAIL_*values via the secure form. - Connect database: Create a managed PostgreSQL instance or connect an existing DB via connection string.
- Deploy: First build starts → Composer, npm, migrate, cache — all automatic.
- Connect domain: Add a CNAME record in DNS → SSL is automatically provisioned.
After the first deploy, every git push automatically triggers the same pipeline. If rollback is needed, you can revert to the previous version with one click in the panel.
Frequently Asked Questions
Why PaaS instead of Laravel Forge or Vapor?
Forge is a server provisioning tool — it configures a VPS on your behalf, but the server is still your responsibility (updates, disk, security). Vapor runs on AWS Lambda in a serverless architecture; it's a different model and can have cold-start issues. PaaS takes a container-based approach between the two: no server management, but your application lives as an always-running process.
What happens when queue worker needs a restart?
On PaaS platforms, every deploy automatically restarts the queue worker. The queue:restart command can be added to deploy hooks, or the platform handles it automatically.
Where are uploaded files stored?
In production, file uploads should be directed to object storage (S3-compatible) rather than local disk. Laravel's Storage facade supports this with a single line: FILESYSTEM_DISK=s3. Local files may be lost when the container is recreated — this isn't PaaS-specific; it's the nature of container architecture.
Does Turkey location affect Laravel performance?
Yes. When your database and application server are in Turkey, you avoid 80-120ms network latency on every SQL query. If your users are in Turkey, page load time drops directly.
Conclusion
Laravel is a modern framework that requires modern infrastructure. Shared hosting can't provide this. VPS can, but the operational burden is high. PaaS automatically configures everything Laravel needs — Composer, artisan, queue, scheduler, SSL.
If you're building a SaaS, API, or web application with Laravel and want to spend your time on product rather than server maintenance, PaaS is the right choice.
To try Skyversal: Start your first Laravel deploy. Connect your GitHub repo, let framework detection run, and see it live within minutes.