PHPackages                             sansanlabs/laravel-git-ftp-deployer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. sansanlabs/laravel-git-ftp-deployer

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

sansanlabs/laravel-git-ftp-deployer
===================================

Laravel Git-FTP deployment package with git status checking and build integration

v2.0.1(2mo ago)0257MITPHPPHP ^8.2CI passing

Since Jul 3Pushed 2mo agoCompare

[ Source](https://github.com/sansanlabs/laravel-git-ftp-deployer)[ Packagist](https://packagist.org/packages/sansanlabs/laravel-git-ftp-deployer)[ Docs](https://github.com/sansanlabs/laravel-git-ftp-deployer)[ GitHub Sponsors](https://github.com/sansanlabs)[ RSS](/packages/sansanlabs-laravel-git-ftp-deployer/feed)WikiDiscussions main Synced today

READMEChangelog (7)Dependencies (26)Versions (11)Used By (0)

Laravel Git-FTP Deployer
========================

[](#laravel-git-ftp-deployer)

[![Latest Version on Packagist](https://camo.githubusercontent.com/31c80fcf937170753ef45cb645415e9420eefb808c70884c306faa6005b1408c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73616e73616e6c6162732f6c61726176656c2d6769742d6674702d6465706c6f7965722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sansanlabs/laravel-git-ftp-deployer)[![GitHub Tests Action Status](https://camo.githubusercontent.com/deb066f705706c0a83e11ed090ad6a863b46bec9a883f40f9ab57a27c2804c66/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f73616e73616e6c6162732f6c61726176656c2d6769742d6674702d6465706c6f7965722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/sansanlabs/laravel-git-ftp-deployer/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/831d5e1abd4d1fdc13e7b2fb1368398112538d1cde9189bf5ea14a5ccfc1b2d1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f73616e73616e6c6162732f6c61726176656c2d6769742d6674702d6465706c6f7965722f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/sansanlabs/laravel-git-ftp-deployer/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/cd92053c7dfa3636196d97152a0a10eeb1243b898203b2b11d541734552cedd5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73616e73616e6c6162732f6c61726176656c2d6769742d6674702d6465706c6f7965722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sansanlabs/laravel-git-ftp-deployer)

A Laravel package for deploying applications via FTP with git status checking and build process integration.

Features
--------

[](#features)

- ✅ Check git status before deployment
- ✅ Prevent deployment with uncommitted changes
- ✅ Prevent deployment with unpushed commits
- ✅ Run build commands (npm, yarn, etc.) before deployment
- ✅ Support multiple environments (staging, production)
- ✅ Beautiful tree view for uncommitted changes
- ✅ Cross-platform support (Windows, Linux, macOS)
- ✅ Configurable git-ftp options

Requirements
------------

[](#requirements)

- PHP ^8.2
- Laravel ^10.0|^11.0|^12.0
- git-ftp installed on your system

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require sansanlabs/laravel-git-ftp-deployer
```

You can publish the config file with:

```
php artisan vendor:publish --tag="git-ftp-deployer-config"
```

This is the contents of the published config file:

```
return [
  /*
    |--------------------------------------------------------------------------
    | Git-FTP Deploy Configuration
    |--------------------------------------------------------------------------
    |
    | Configuration for Git-FTP deployment package
    |
    */
  "environments" => [
    "staging" => [
      "host" => env("STAGING_FTP_HOST"),
      "username" => env("STAGING_FTP_USERNAME"),
      "password" => env("STAGING_FTP_PASSWORD"),
      "path" => env("STAGING_FTP_PATH", "/website/"),
    ],
    "production" => [
      "host" => env("PRODUCTION_FTP_HOST"),
      "username" => env("PRODUCTION_FTP_USERNAME"),
      "password" => env("PRODUCTION_FTP_PASSWORD"),
      "path" => env("PRODUCTION_FTP_PATH", "/website/"),
    ],
  ],

  /*
    |--------------------------------------------------------------------------
    | Build Command
    |--------------------------------------------------------------------------
    |
    | The command to run before deployment
    |
    */
  "build_command" => env("GIT_FTP_BUILD_COMMAND", "npm run build"),

  /*
    |--------------------------------------------------------------------------
    | Git Bash Path
    |--------------------------------------------------------------------------
    |
    | Path to Git Bash executable (default on Windows)
    |
    */
  "git_bash_path" => env("GIT_BASH_PATH", "C:\\Program Files\\Git\\bin\\bash.exe"),

  /*
    |--------------------------------------------------------------------------
    | Git-FTP Options
    |--------------------------------------------------------------------------
    |
    | Additional options for git-ftp command
    |
    */
  "git_ftp_options" => [
    "force" => env("GIT_FTP_FORCE", true),
    "verbose" => env("GIT_FTP_VERBOSE", true),
    "auto_init" => env("GIT_FTP_AUTO_INIT", true),
  ],
];
```

Configuration
-------------

[](#configuration)

Add your FTP credentials to your .env file:

```
# Staging Environment
STAGING_FTP_HOST=ftp.yoursite.com
STAGING_FTP_USERNAME=your-username
STAGING_FTP_PASSWORD=your-password
STAGING_FTP_PATH=/public_html/staging/

# Production Environment
PROD_FTP_HOST=ftp.yoursite.com
PROD_FTP_USERNAME=your-username
PROD_FTP_PASSWORD=your-password
PROD_FTP_PATH=/public_html/

# Build Command (optional)
FTP_BUILD_COMMAND="npm run build"

# Git Bash Path
GIT_BASH_PATH="C:\Program Files\Git\bin\bash.exe"
```

Usage
-----

[](#usage)

### Basic Deployment

[](#basic-deployment)

#### Deploy to staging:

[](#deploy-to-staging)

```
php artisan deploy:ftp --env=staging
```

#### Deploy to production:

[](#deploy-to-production)

```
php artisan deploy:ftp --env=production
```

#### Interactive environment selection:

[](#interactive-environment-selection)

```
php artisan deploy:ftp
```

### Skip Build Process

[](#skip-build-process)

#### Skip the build command:

[](#skip-the-build-command)

```
php artisan deploy:ftp --skip-build
```

Configuration Options
---------------------

[](#configuration-options)

The package configuration file config/ftp-deploy.php allows you to customize:

- Environments: Define multiple deployment environments
- Build Command: Command to run before deployment (default: npm run build)
- Git Bash Path: Path to Git Bash executable (Windows only)
- Git FTP Options: Additional options for git-ftp command

Git Status Checking
-------------------

[](#git-status-checking)

The package will check for:

1. Uncommitted Changes: Files that have been modified but not committed
2. Unpushed Commits: Commits that exist locally but haven't been pushed to origin

If either condition is found, deployment will be aborted with a detailed report.

Build Process
-------------

[](#build-process)

Before deployment, the package will run your configured build command (default: npm run build). This ensures your assets are compiled and ready for production.

FTP Deployment
--------------

[](#ftp-deployment)

The package uses git-ftp to efficiently deploy only changed files to your FTP server. It supports:

- Force push
- Verbose output
- Auto-initialization of git-ftp
- Custom sync roots and paths

Testing
-------

[](#testing)

Upcoming ...

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Edi kurniawan](https://github.com/edikurniawan-dev)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance86

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~48 days

Recently: every ~72 days

Total

7

Last Release

77d ago

Major Versions

v1.2.0 → v2.0.02026-04-18

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/192882599?v=4)[SanSan Labs](/maintainers/sansanlabs)[@sansanlabs](https://github.com/sansanlabs)

---

Top Contributors

[![edikurniawan-dev](https://avatars.githubusercontent.com/u/50087198?v=4)](https://github.com/edikurniawan-dev "edikurniawan-dev (30 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (8 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

---

Tags

ftplaraveldeploymentsansanlabslaravel-git-ftp-deployergit-ftp

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/sansanlabs-laravel-git-ftp-deployer/health.svg)

```
[![Health](https://phpackages.com/badges/sansanlabs-laravel-git-ftp-deployer/health.svg)](https://phpackages.com/packages/sansanlabs-laravel-git-ftp-deployer)
```

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.4k](/packages/spatie-laravel-permission)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M100](/packages/dedoc-scramble)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.8k3](/packages/defstudio-telegraph)[spatie/laravel-passkeys

Use passkeys in your Laravel app

471890.7k39](/packages/spatie-laravel-passkeys)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
