Guide
Put a Laravel app online from GitHub
Connect GitHub once, add a Laravel site with its database, fill in its settings file, publish it, and turn on automatic updates and a queue worker.
Last updated 3 min read10 stepsView as Markdown
What you will end up with
The site page says it is live and visitors see the latest version. The Updates tab lists the first update as Published. Each push to the branch starts a new update by itself.
Go to the first stepThis guide puts a Laravel app from a GitHub repository online, with its database, its scheduled tasks and a queue worker, and publishes every push automatically. GitLab and Bitbucket work the same way.
What you need#
- A website server or Laravel server that is Online.
- Your Laravel project on GitHub, and a GitHub personal access token (the Code hosting page links to where you create it).
Steps#
-
Connect GitHub once. Open Team and settings › Code hosting and choose Connect GitHub. Paste your Personal access token in the form that opens and choose Connect GitHub again. It is checked right away, then stored encrypted.


-
Add the site. Choose Add a site. In the list under Or pick the exact kind of site, search for "Laravel" and pick Laravel.


-
Address. Choose the server and type the address of the app.
-
Code and settings. Pick your repository from the list and the Branch to publish (often
main). Tick Create a database for this site if the app uses MySQL, MariaDB or PostgreSQL. Choose the PHP version. Keep Publish right after setup and Update automatically when the code changes on. Choose Add site on the Review. Until the first version is published, your address shows a short "waiting for its first version" page instead of an error (see the first page). -
Check the settings file. Open the site's Updates › Environment. Fuzops filled in the usual Laravel settings and the database details. Add your own (mail, storage, payment keys), tick Refresh the settings cache under After saving, then choose Save and publish update.


-
Watch the update. The update page shows each step: get the code, install PHP and JavaScript packages, build assets, cache the configuration, run database migrations, switch, reload PHP, restart background workers.


-
Turn on the scheduler. If your app has scheduled tasks, open the server's Services › Scheduled jobs and choose Turn on beside your site under Laravel sites with their own schedule. Or use the site's Laravel tab › Scheduled tasks.
-
Add a queue worker, or Horizon. If your app uses queues, open the site's Laravel tab. Turn on Queue worker for jobs kept in the database, or Turn on Horizon for jobs kept in Redis: Horizon runs them and adds a dashboard. Use one or the other. Either restarts after every update so it runs the new code. For live updates in your pages, turn on Reverb on the same tab: see Turn on Horizon and Reverb.
-
Livewire, Filament and similar packages work as they are. Their scripts and uploads (such as
/livewire/livewire.js) reach your app: This site uses Livewire in the site's Settings › Limits and easy fixes is on and says "Already handled". Livewire uploads follow Largest upload there. See Recommended settings and limits. -
Turn on the after-update check. Open After-update check, keep the page
/up(Laravel 11 and newer) and save. A version that breaks the site is then switched back by itself.
What you should see#
The site page says it is live and visitors see the latest version. The Updates tab lists the first update as Published. Each push to the branch starts a new update by itself.
If it goes wrong#
- The update stopped at "Install PHP packages": a package needs a PHP extension or a newer PHP. Read See what went wrong, switch the PHP version under PHP settings if needed, and Publish again.
- The update stopped at "Run database migrations": check the database settings in the Environment. The site stays on the version before.
- 500 error after publishing: open Logs › What went wrong; a missing setting in the Environment is the usual cause. See Logs.
- Pushes do not publish: check Update automatically when the code changes in Update settings, and that you push to the branch shown there.
Still stuck? Get help