Skip to content
Help center

What should I set up for a Laravel app?

Six settings that make a Laravel app run well on Tanzahost - migrations, storage, queues, the scheduler, variables and limits.

Updated 17 Oct 20262 min read

Turn on migrations on each deploy, keep storage as a permanent folder, add a worker for your queue and a scheduled task for the scheduler, and put your .env in Variables. We find Laravel from your composer.json and build it for you.

The checklist

Asha's shop, duka, uses every one of these.

  1. Variables. Open your project's Variables tab and choose your app. Choose Paste a .env file, paste your .env, and choose Add them. When the page says Redeploy to apply, choose Redeploy.

  2. Migrations. On your app's page, in the Laravel card, turn on Run migrations on each deploy, before the new version goes live. If a migration fails, the old version keeps running.

  3. Uploaded files. storage is a permanent folder by default for Laravel, so leave Permanent folders in the Build and run card empty, or keep storage in the list if you add folders of your own. Everything else is fresh on each deploy. Then press Storage link in the Laravel card once.

  4. The queue. In the Processes card, choose Add a worker or scheduled task. Kind: Worker. Command: php artisan queue:work.

  5. The scheduler. Add another one. Kind: Scheduled task. Command: php artisan schedule:run. Timetable: * * * * *, every minute. Timetables are in UTC.

  6. Limits. In the Limits card, set the most memory and processor time the app may use. You pay only for what it really uses, every hour.

Using MySQL, MariaDB or PostgreSQL? PHP's driver for it isn't added by itself yet: require ext-pdo_mysql (or ext-pdo_pgsql) in composer.json, or tick it under PHP extensions. See could not find driver.

The Laravel buttons

In the Laravel card, each button runs once with your live version, its variables and its storage:

ButtonWhat it does
Run migrationsphp artisan migrate --force
Storage linkphp artisan storage:link
Clear cachephp artisan optimize:clear
Maintenance on / Maintenance offphp artisan down / php artisan up

Sending email

Open your app and turn on Send email: your app gets its own mail login, with Laravel's MAIL_ variables set for you. See Sending email from your app. You can also use another email service on port 587 or 465, with its details in Variables; port 25 is closed.

For the full walkthrough, read Laravel.