</> HTML5Advent
ENFRESDEITPT

// hosting

Laravel hosting in 2026: how to host a Laravel app (VPS, Forge, Cloud)

How to host a Laravel app: the four options compared with real prices (shared, Laravel Cloud, Forge or Ploi on a VPS, plain VPS), the PHP versions Laravel 12 and 13 need, a full deployment walkthrough and a redeploy script.

A developer wearing headphones working at a desk in front of a monitor full of code, with code projected on the wall behind

Not sure how big your server should be? Try the free VPS size calculator →

Laravel is a full PHP application framework, not a set of pages you upload by FTP. It expects a real runtime: a recent PHP, several extensions, a writable storage directory, scheduled tasks and - for anything non-trivial - background queue workers. That's why basic shared hosting often fights you, and why a VPS is usually the right home for a Laravel app. This guide covers what the server actually needs and walks through a real deployment.

Not sure your plan meets those needs? Our PHP server requirements guide compares shared hosting and a VPS on PHP versions, extensions and OPcache.

The four ways to host Laravel, with real prices

Prices below were read on the providers' official pricing pages on 18 October 2026. They change, so confirm before you buy.

OptionWhat you payWhat you getBest for
Shared hostingA few EUR a monthA web root, often no SSH, no long-running processesRarely Laravel: only tiny apps without queues
Laravel Cloud (managed)Starter 5 USD/mo + usage (5 USD of usage credits included); Growth 20 USD/mo + usageFully managed compute, queues, scale-to-zero; Starter is capped at 2 GiB RAM per instanceTeams that never want to touch a server
Forge or Ploi + your VPSForge Hobby 12 USD/mo; Ploi Free (1 server, 1 site) or Basic 8 EUR/mo. Plus the VPSPush-to-deploy, SSL, workers and cron configured for you on a server you ownDevelopers who want automation without platform lock-in
Plain VPS (unmanaged)From 5.50 EUR/mo for a Contabo Cloud VPS 4 (4 vCPU, 8 GB RAM, 100 GB)Root access, guaranteed resources, you run the setup belowLowest cost per GB of RAM, full control

The middle two rows combine: Forge and Ploi do not sell servers, they configure the one you rent. A Ploi Free + small VPS setup costs about the price of the VPS alone, which makes it the cheapest automated option for a single app.

Why a VPS suits Laravel

Shared hosting is built for "drop files in a web root". Laravel wants more than that: SSH access to run composer and artisan, the ability to point the web server at the public/ directory, a long-running process to drain the queue, and a cron entry for the scheduler. A VPS gives you root access, guaranteed RAM and CPU, and full control of the stack - exactly what those needs require. A managed platform can also work, but a VPS is the most flexible middle ground once an app has queues, a database and a cache.

Server requirements

PHP and extensions

Match PHP to your Laravel release. According to Laravel's support table (checked 18 October 2026):

LaravelSupported PHPBug fixes untilSecurity fixes until
13 (current)8.3 to 8.5Q3 2027Q1 2028
128.2 to 8.513 Aug 2026 (ended)24 Feb 2027
118.2 to 8.4endedended 12 Mar 2026

In practice: start new projects on Laravel 13 with PHP 8.3 or newer, and plan the upgrade of any Laravel 11 app, which no longer gets security fixes. The deployment docs list the required extensions: Ctype, cURL, DOM, Fileinfo, Filter, Hash, Mbstring, OpenSSL, PCRE, PDO, Session, Tokenizer and XML. Several are compiled into PHP by default; on a Debian/Ubuntu VPS the rest come with these packages:

# Ubuntu/Debian: PHP-FPM + the extensions Laravel expects
sudo apt install -y php-fpm php-cli php-mbstring php-xml \
  php-bcmath php-curl php-mysql php-zip php-gd php-intl

# Composer (dependency manager)
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer

The exact package names vary by distribution, but the extensions to confirm are mbstring, xml, bcmath, curl, the database driver (pdo_mysql or pdo_pgsql), zip and openssl. Missing one usually shows up as a clear error during composer install or at boot.

Database, cache and queue backend

Most Laravel apps pair with MySQL/MariaDB or PostgreSQL. For anything that uses queues, sessions or caching at scale, add Redis - it serves as a fast cache, session store and queue driver in one. Make sure the VPS has enough RAM for the database and Redis alongside PHP-FPM workers; memory is the resource you're most likely to exhaust.

Storage permissions

Laravel writes to two directories, storage/ and bootstrap/cache/. The web-server user (often www-data) must be able to write to them, or you'll get permission errors that look like application bugs:

sudo chown -R www-data:www-data storage bootstrap/cache
sudo chmod -R ug+rwX storage bootstrap/cache
Close-up of a screen showing syntax-highlighted code with functions and conditionals
A Laravel deployment is a repeatable sequence of commands - install dependencies, cache config and routes, run migrations - rather than uploading files by hand.

Deployment walkthrough

1. Get the code and install dependencies

Pull the repository onto the server, then install the production dependencies. The flags below skip dev packages and build an optimised autoloader:

git clone https://github.com/you/your-app.git /var/www/app
cd /var/www/app
composer install --no-dev --optimize-autoloader

2. Configure the environment

Laravel reads configuration from a .env file that is never committed to git. Copy the example, generate the app key, and fill in the real values:

cp .env.example .env
php artisan key:generate

A minimal production .env looks like this - set APP_DEBUG to false so errors aren't leaked to visitors:

APP_NAME="Your App"
APP_ENV=production
APP_KEY=base64:...generated...
APP_DEBUG=false
APP_URL=https://yourapp.com

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=yourapp
DB_USERNAME=yourapp
DB_PASSWORD=change-me

CACHE_STORE=redis
QUEUE_CONNECTION=redis
SESSION_DRIVER=redis
REDIS_HOST=127.0.0.1

3. Migrate and cache for production

Run the database migrations, then build Laravel's caches. Since Laravel 11 a single optimize command caches config, events, routes and views in one go. Rebuild it on every deploy, since it freezes the current state:

php artisan migrate --force
php artisan optimize          # config, events, routes, views
# php artisan optimize:clear  # removes them again

One trap the docs warn about: once config is cached, the .env file is no longer loaded, so any env() call outside the config/ files returns null. Read settings through config() in your code.

4. Point Nginx at public/

The web server's document root must be the public/ directory - never the project root, or you'd expose .env and source files. A standard Nginx + PHP-FPM server block:

server {
    listen 80;
    server_name yourapp.com;
    root /var/www/app/public;

    index index.php;
    charset utf-8;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ \.php$ {
        fastcgi_pass unix:/run/php/php-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location ~ /\.(?!well-known).* {
        deny all;
    }
}

Add HTTPS with a free automated certificate (most hosts and tools like Certbot make this a one-liner) - a production app should always be served over TLS.

5. Run the queue worker with Supervisor

Background jobs (emails, notifications, exports) run through a queue worker, a long-running process that must survive crashes and reboots. Don't run php artisan queue:work by hand in an SSH session - use a process manager like Supervisor to keep it alive:

# /etc/supervisor/conf.d/app-worker.conf
[program:app-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/app/artisan queue:work redis --sleep=3 --tries=3 --max-time=3600
autostart=true
autorestart=true
user=www-data
numprocs=2
redirect_stderr=true
stdout_logfile=/var/www/app/storage/logs/worker.log
stopwaitsecs=3600
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start app-worker:*

6. Schedule the scheduler

Laravel's task scheduler is driven by a single cron entry that runs every minute; Laravel itself decides which tasks are due. Add it to the deploy user's crontab:

* * * * * cd /var/www/app && php artisan schedule:run >> /dev/null 2>&1

7. Redeploy without forgetting a step

Every later deploy repeats the same sequence, and the step people forget is queue:restart: workers are long-running processes that keep the old code in memory until told to reload. Put it in a script:

#!/usr/bin/env bash
# deploy.sh - run from /var/www/app as the deploy user
set -euo pipefail
php artisan down --retry=15
git pull --ff-only
composer install --no-dev --optimize-autoloader --no-interaction
php artisan migrate --force
php artisan optimize
php artisan queue:restart      # workers reload the new code
php artisan up
sudo systemctl reload php8.3-fpm   # match your PHP version

This takes the app offline for the few seconds of the deploy. If that matters, the next step is release folders plus a symlink switch, which is what Forge, Ploi and Envoyer automate.

Sizing the VPS

Memory runs out first on a Laravel server. A rough budget for one app: about 0.5 GB for the OS, 30 to 60 MB per PHP-FPM worker, a few hundred MB for MySQL or PostgreSQL on a small dataset, 50 to 100 MB for Redis, and the same per-worker cost for each queue worker. These are rules of thumb; measure your own app with free -m and ps once it runs.

App profileRealistic needExample plan (checked 18 Oct 2026)
One app, light traffic, database on the same box2 vCPU, 2 to 4 GB RAM, 40 GB diskContabo Cloud VPS 4: 4 vCPU, 8 GB, 100 GB, from 5.50 EUR/mo
Queues + Redis + database, or 2 to 4 apps4 vCPU, 6 to 8 GB RAMCloud VPS 4 still fits; Cloud VPS 6 (6 vCPU, 12 GB, from 7.50 EUR/mo) for headroom
Higher traffic, heavy jobs, staging copy6 to 8 vCPU, 12 to 24 GB RAMCloud VPS 8 (8 vCPU, 24 GB, from 14 EUR/mo); move the database out later

Want a number for your own traffic? The VPS size calculator opens with the Laravel profile selected and shows every assumption it uses.

Who it's for

  • Prefer not to manage a server: a managed platform or managed VPS handles patching and process supervision for you, at a higher price.
  • Comfortable on the command line: an unmanaged VPS is cheaper and fully flexible - you own the PHP, Nginx, Supervisor and cron setup shown above.
  • Growing app with queues and cache: a VPS with guaranteed RAM/CPU and Redis is the natural fit; size memory first, then CPU, then storage.

How to decide

Start from what Laravel needs to run well: SSH access, a supported PHP with the right extensions, a database and (for queues/cache) Redis, writable storage, a queue worker under Supervisor and a one-line cron for the scheduler. A VPS gives you all of that with guaranteed resources and a clear path to scale - match the plan to your traffic and background-job load, and pick the smallest one that covers it with headroom.

Frequently asked questions

Can I host Laravel on shared hosting?
Sometimes, for a small app without queues: you need SSH, Composer, a supported PHP and the ability to point the document root at public/. Most shared plans fail on at least one of those, and none let you run a queue worker under Supervisor. A VPS or a managed platform avoids the fight.
What is the cheapest way to host a Laravel app?
A small unmanaged VPS that you set up yourself, optionally with Ploi's free plan (1 server, 1 site) to automate deploys. On prices checked on 2026-10-18 that is about 5.50 EUR a month for a 4 vCPU / 8 GB Contabo Cloud VPS 4, versus 5 USD a month plus usage on Laravel Cloud Starter.
Which PHP version does Laravel need?
Laravel 13 supports PHP 8.3 to 8.5, Laravel 12 supports PHP 8.2 to 8.5 (Laravel support table, checked 2026-10-18). Laravel 12 receives security fixes only until 24 February 2027, so new projects should start on Laravel 13 with PHP 8.3 or newer.
How much RAM does a Laravel server need?
A single app with MySQL, Redis and two queue workers runs comfortably in 2 to 4 GB. Memory, not CPU, is what runs out first: count PHP-FPM workers, the database buffer pool and Redis before choosing a plan.
Do I need Laravel Forge?
No. Forge (from 12 USD a month) automates server provisioning, deploys, SSL and workers, which saves time if you manage several servers. Everything it does can be done by hand with the commands in this guide.