Developer Deployment

Deployment

Laravix deploys like any Laravel application — plus a scheduler, a queue worker and (optionally) Meilisearch. This is the production checklist.

Server requirements

  • PHP 8.4 (with fileinfo; gd for image variants)
  • A web server (Nginx/Apache/FrankenPHP) with the document root at public/
  • MySQL/MariaDB, PostgreSQL or SQLite
  • Composer on the server (also used by laravix:upgrade)
  • Optional: Meilisearch for production-grade search

First deployment

  1. Get the code onto the server (git or composer create-project laravix/laravix).

  2. Configure .env: APP_ENV=production, APP_DEBUG=false, APP_URL, database credentials, mail settings (invitations and contact forms send email!).

  3. Run the installer — it migrates, links storage, publishes assets and theme, creates the first site and super admin:

    php artisan laravix:install --site-name="My Site" --domain=example.com \
      --admin-name="Admin" [email protected] --admin-password=********
    
  4. Point the site's DNS at the server. The domain in the admin must equal the public hostname — that's how Laravix picks the site for each request.

  5. Cache the config and routes:

    php artisan config:cache && php artisan route:cache && php artisan view:cache
    

The two background essentials

Scheduler — scheduled publishing (laravix:publish-scheduled runs every minute) requires the Laravel scheduler. Add to crontab:

* * * * * cd /path/to/app && php artisan schedule:run >> /dev/null 2>&1

Queue worker — image variants (GenerateImageVariants) run on the queue. Run a worker under a process manager (systemd, Supervisor):

php artisan queue:work --tries=3

For very small sites, QUEUE_CONNECTION=sync in .env processes jobs inline instead — uploads get slower, but no worker is needed.

Warning: Without the cron entry, scheduled content never publishes. Without a worker (on a queue connection other than sync), image variants never appear. These are the two most common "it works locally" surprises.

Multiple sites, one server

Point every site's domain at the same virtual host / document root and create the sites in the admin. TLS certificates must cover every domain. With multiple domains, enable the cross-domain tenant switcher so the admin links each site to its own domain:

CMS_CROSS_DOMAIN_SWITCHER=true

Environment reference (Laravix-specific)

Variable Default Meaning
CMS_CROSS_DOMAIN_SWITCHER false Tenant switcher links to each site's own domain
CMS_UPDATE_CHECK true Check Packagist for new versions and show the admin banner
SCOUT_DRIVER Search driver (database, meilisearch, …)
SCOUT_QUEUE false Queue search index updates
MEILISEARCH_HOST / MEILISEARCH_KEY Meilisearch connection

Everything else (database, cache, session, mail, queue) is standard Laravel configuration.

Deploying updates

For code/config updates: pull, composer install --no-dev, php artisan migrate --force, re-cache. For Laravix core updates use php artisan laravix:upgrade — the full procedure is in Upgrading.

Post-deploy verification

  1. Open the public site — the homepage renders (theme mode) or returns 404 (headless — expected).
  2. Open /admin, log in, upload a test image and check its variants appear (worker OK).
  3. Schedule a piece of content a minute ahead and watch it publish (cron OK).
  4. Submit the contact form if the site uses one (mail OK).
Laravix Documentation · 14.07.2026
Star on GitHub