[Laravel](/services/software development) Deployment: From local to production (2026)
Published: June 2026 | Reading time: about 15 minutes Category: DevOps
Deployment of a Laravel application can initially be intimidating, but with the right knowledge and tools it is a structured process. In this guide we will guide you through all steps to bring your Laravel application safely and efficiently into production.
Hosting Options for Laravel
Option Description Recommended for
Laravel Forge Managed Server Provisioning by Laravel Professional projects
**Laravel Vapor * * Serverless Deployment on AWS Scalable applications
**Shared Hosting * * Cheap hosting with SSH access Small projects, budgets
**VPS/Cloud * * DigitalOcean, Linode, AWS EC2 Full control
Server Requirements
PHP > = 8.2 with necessary extensions
Composer
Web server (Nginx or Apache)
Database (MySQL, PostgreSQL, SQLite)
Node.js & NPM (for frontend sets)
Step-by-step deployment
1. Prepare application for production
Configure .env for production APP ENV=production APP DEBUG=false APP URL=https://ihre-domain.de
Generate Secure App Key php artisan key:generate
2. Transfer files to the server
With Git (recommended)
git clone https://github.com/ihr-repo/projekt.git /var/www/project cd /var/www.project git checkout main
Or with rsync
rsync -avz --exclude='.git' --exclude='node modules' . ./project/user@server:/var/www/project/
3. Install dependencies
Composer dependencies (without dev packages)
composer install --optimize-autoloader --no-dev
Build NPM liabilities and assets
npm install npm run build
4. Optimizations for production
Configuration caching
php artisan config:cache
Routes caching
php artisan route:cache
Views caching
php artisan view:cache
Optimize Autoloader (ready in composer install)
composer dump-autoload --optimize
5. migrate database
php artisan migrate --force
6. Set permissions
sudo chown -R www-data:www-data /var/www/project sudo chmod -R 755 /var/www/project sudo chmod -R 775 /var/www/project/storage sudo chmod -R 775 /var/www/project/bootstrap/cache
Nginx configuration
server list 80; server name their-domain.de; root /var/www/project/public;
add header X-frame options "SAMEORIGIN"; add header X-Content Type Options "nosniff";
index
charset utf-8;
location / { try files $uri $uri/ /index.php?$query string; }
location = /favicon.ico { access log off; log not found off; } location = /robots.txt { access log off; log not found off; }
error page 404 /index.php;
location ~ .php$ { fastcgi pass unix:/var/run/php/php8.2-fpm.sock; fastcgi param SCRIPT FILENAME $realpath root$fastcgi script name; include fastcgi params; }
location ~ /.(?!well-known).* { deny all; } }
**Important:**Forget
About the author
Groenewold IT Solutions
Softwareentwicklung & Digitalisierung
Praxiserprobte Einblicke aus Projekten rund um individuelle Softwareentwicklung, Integration, Modernisierung und Betrieb – mit Fokus auf messbare Ergebnisse und nachhaltige Architektur.
Related topics:
Read more
Related articles
These posts might also interest you.
Laravel Testing: Robust applications by testing 2026
Write robust tests for your Laravel application! Our guide will guide you through unit tests, feature tests, database testing and test drives development.
9 February 2026
LaravelLaravel 12: All new features and improvements 2026
Discover all the new features of Laravel 12! Our comprehensive guide presents the most important innovations, improvements and breaking changes.
17 January 2026
LaravelLaravel Tutorial German: The ultimate guide for...
Learn Laravel from scratch! Our comprehensive German tutorial for beginners will guide you through the installation, the MVC concept and your first project. Start your trip to Laravel-Profi now.
15 January 2026
Free download
Checklist: 10 questions before software development
What to clarify before investing in custom software – budget, timeline, requirements and more.
Get the checklist in a consultationRelevant next steps
Related services & solutions
Based on this article's topic, these pages are often the most useful next steps.
