w wokku
Get Started
~/docs
/
frameworks

# Deploy Laravel

Updated · Edit on GitHub ↗

Deploy a Laravel app to Wokku with Postgres, run migrations on every release,
and go live on HTTPS — in a few minutes.

Prerequisites

1. Create the app

  1. Go to Apps → New App
  2. Choose your server and name it (e.g. my-laravel-app)
  3. Pick a box size and click Create

2. Prepare your Laravel app

Add a Procfile to your project root so Wokku knows how to serve the app and
run migrations on each deploy:

procfile
web: vendor/bin/heroku-php-apache2 public/
release: php artisan migrate --force

The buildpack auto-detects Laravel from composer.json and installs PHP +
Composer dependencies. The release process runs after a successful build,
before traffic shifts
— so migrations apply with zero downtime.

3. Set environment variables

Laravel needs at least an app key and production env. Generate a key locally
with php artisan key:generate --show, then:

Open your app → Config and add:

Key Value
APP_KEY base64:... (from key:generate --show)
APP_ENV production
APP_DEBUG false

See Environment Variables for the full reference.

4. Add a database

Provision a Postgres database and link it — Wokku injects a DATABASE_URL
automatically. Point Laravel at it by setting DB_CONNECTION=pgsql (Laravel
reads DATABASE_URL natively in recent versions).

App → Resources → Add-ons, choose Postgres, and link it to the app.

More detail in Create & Link a Database.

5. Deploy

Copy the git remote from your app’s overview page, then:

bash
git remote add wokku git@git.wokku.cloud:my-laravel-app
git push wokku main

Watch the build stream in your logs. When it finishes, your app is live at
https://my-laravel-app.wokku.app.

6. Add a custom domain

Point your own domain and Wokku provisions SSL automatically — see
Custom Domains.

Troubleshooting

  • 500 on first load — usually a missing APP_KEY. Set it (step 3) and redeploy.
  • Migrations didn’t run — confirm the release: line is in your Procfile and check the deploy logs.
  • Storage / sessions — use the database or cache driver for sessions in production; local disk is ephemeral.

Next steps

Was this page helpful?