Deploying Laravel Projects Manually: A Step-by-Step Guide for Beginners (No CI/CD Needed)
You're finally done building your Laravel application. It works beautifully on your local machine. Now it's time to share it with the world. But there's one big question:
“How do I get this project live... without using complicated CI/CD pipelines?”
If you’re a beginner or don’t have access to tools like GitHub Actions, Jenkins, or Forge—don’t worry. You can still deploy Laravel manually, and this guide will show you how.
🔧 What You’ll Learn
By the end of this guide, you’ll know how to:
- Upload your Laravel project to a remote server
- Set up environment variables and permissions
- Configure Apache or Nginx
- Run Laravel-specific setup commands
- Deploy updates safely without downtime
Let’s jump in!
🗂️ Step 1: Prepare Your Server
Whether you're using a VPS (like DigitalOcean), shared hosting, or a control panel like CWP or cPanel, your server should have:
- PHP 8.1 or later
- MySQL or PostgreSQL
- Composer
- A web server (Apache or Nginx)
Make sure SSH access is enabled, and you can log in to the server using a terminal.
📁 Step 2: Upload Your Project Files
You can upload your Laravel project using one of these methods:
🔹 Option 1: Using Git (Recommended)
If your code is in GitHub or GitLab:
ssh user@your-server-ip
cd /var/www/html
git clone https://github.com/yourusername/your-laravel-project.git
🔹 Option 2: Using FTP or File Manager
- Zip your Laravel project folder.
- Upload it via CWP File Manager or an FTP tool like FileZilla.
- Unzip the contents inside your web root (
/home/your_user/public_html/or/var/www/html).
⚙️ Step 3: Set Up Your Environment
Laravel needs an .env file for configuration.
Rename the example env file:
cp .env.example .envUpdate Database and App Info:
APP_NAME="MyLaravelApp" APP_URL=http://yourdomain.com DB_DATABASE=your_database DB_USERNAME=your_username DB_PASSWORD=your_password
📦 Step 4: Install Dependencies
Laravel uses Composer for managing PHP packages.
Run this on your server inside the project folder:
composer install --no-dev --optimize-autoloader
If you get a “composer not found” error, install Composer:
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
🔑 Step 5: Set Correct Permissions
Laravel needs write permissions for certain folders:
chmod -R 775 storage
chmod -R 775 bootstrap/cache
You might also run:
chown -R www-data:www-data .
🔒 Tip: Never give full 777 permission in production.
🧠 Step 6: Run Key Artisan Commands
Now that everything’s in place, run:
php artisan key:generate
php artisan config:cache
php artisan migrate
php artisan storage:link
These commands:
- Generate app encryption keys
- Cache configs
- Run database migrations
- Link the storage folder
🌐 Step 7: Configure the Web Server
Make sure your web server points to the **public/** directory.
🔹 Apache Virtual Host Example:
<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot /var/www/html/your-project/public
<Directory /var/www/html/your-project/public>
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Then restart Apache:
sudo service apache2 restart
🔹 For Nginx Users:
Use this block inside your server config:
root /var/www/html/your-project/public;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
Restart Nginx:
sudo service nginx restart
🔄 Step 8: Deploying Updates (Manually)
To update your app later:
Pull latest changes from Git (or upload manually)
Run:
composer install --no-dev php artisan migrate php artisan config:cacheDone! 🎉
📌 Quick Checklist
✅ Code uploaded
✅ .env configured
✅ Composer dependencies installed
✅ Permissions set
✅ Artisan commands run
✅ Web server pointing to public/
✅ App online!
🧠 Real-Life Example
Let’s say you’re freelancing for a small business that needs their Laravel app online today. You don’t have time to set up GitHub Actions or Forge.
With just SSH, Composer, and this guide—you can deploy manually in under 30 minutes.
⚠️ Tips & Gotchas
🚫 Don’t upload the .env file to public Git repos
🔒 Keep storage/ and .env outside public access
🐘 Always back up your database before running migrate
🎯 Use php artisan down during major updates to prevent user errors
🏁 Conclusion
CI/CD pipelines are powerful—but not required.
Whether you’re freelancing, working solo, or managing a tight budget, manual Laravel deployment is 100% possible and effective if done right.
You now have the step-by-step foundation to go live confidently. 💪
❓ FAQs
Q1: Can I use shared hosting for Laravel?
Yes, but make sure it supports PHP 8+, Composer, and has SSH access. Some shared hosts require a bit more setup.
Q2: Is manual deployment safe for production?
Yes—as long as you follow best practices: proper permissions, secure .env, backups, and safe database updates.
Q3: What’s the risk of skipping CI/CD?
You might introduce errors or downtime if you're not careful. Manual deployment requires discipline and testing before pushing changes.
💬 Your Turn!
Have you manually deployed a Laravel project before?
What worked well—or what went wrong?
👉 Share your experience or ask a question in the comments below!
Projects to explore next
Source-code projects from the KritiMyantra catalogue. Check each project's details before buying.
Flask Authentication System (Free Version) - Kritim Yantra
🛠 Features✔ Google & GitHub Authentication✔ User Registration & Login✔ Profile/Dashboard Access✔ Secure & Mi...
Flask Blog CMS with Admin Dashboard — Python Source Code
A Flask-based blogging website with a built-in admin dashboard. Manage articles, images, categories, tags and featured p...
Laravel 12 + ReactJS Starter Kit: Add Multi-Language Support (Arabic, English, Spanish) with Blog CRUD
🚀 Installation & Setup Download & Extract Get the ZIP from kritimyantra.com and extract it. Includes preconfigu...
Comments
No comments yet. Be the first to comment.
Sign in to join the discussion.