How to Deploy a Laravel Application from GitHub in Minutes
237 Host Team
Author
Learn how to connect your GitHub repository to 237 Host and deploy your Laravel application automatically with every push. No SSH, no FTP, no headaches.
237 Host Team
Author
Learn how to connect your GitHub repository to 237 Host and deploy your Laravel application automatically with every push. No SSH, no FTP, no headaches.
Deploying manually — uploading ZIP files, running composer install on the server, clearing caches by hand — gets old fast. By connecting your GitHub repository to 237 Host, every git push triggers an automatic deployment. Your code goes live in seconds, and you never have to think about manual uploads again.
Log in to your 237 Host dashboard and navigate to My Websites → Create Website. Choose Laravel as the deployment type. Give your site a name and pick a free subdomain (e.g. myapp.237host.com) or connect a custom domain.
237 Host will automatically provision the directory structure, set up a MySQL database, and configure the web server to serve your Laravel public/ directory.
In your website settings, scroll to the Deployment Source section and select GitHub. You will see a webhook URL — copy it.
Now go to your GitHub repository:
Make a small commit and push to your main branch:
git commit --allow-empty -m "Trigger initial deployment"
git push origin main
Within a few seconds, you should see a new deployment appear in your 237 Host dashboard under Deployments. The platform will:
composer install --no-dev --optimize-autoloaderphp artisan migrate --force (if migrations exist)Every Laravel app needs environment variables. In your 237 Host dashboard, go to Website Settings → Environment and add your production variables:
APP_ENV=production
APP_DEBUG=false
APP_KEY=base64:your-key-here
DB_DATABASE=your_db
DB_USERNAME=your_user
DB_PASSWORD=your_password
These are injected into the .env file at deployment time, so you never need to commit secrets to your repository.
With the webhook configured, every push to your main branch will automatically trigger a new deployment. If you prefer manual control, you can disable auto-deploy and trigger deployments from the dashboard with a single click.
Every successful deployment creates a snapshot. If something goes wrong — a bad migration, a syntax error, a broken dependency — you can roll back to any previous deployment from the Deployments tab. Click Rollback on any previous successful deployment and 237 Host will restore that version instantly.
php artisan config:cache, route:cache, and view:cache — 237 Host does this automatically during deployment.--no-dev in production to skip test dependencies.Deploying Laravel from GitHub with 237 Host takes about five minutes to set up and saves you hours over the lifetime of your project. No SSH keys to manage, no deployment scripts to write, no server configuration to maintain. Just push your code and let the platform handle the rest.
Ready to deploy your Laravel app? Create a free account and get started in minutes.