PHPackages                             cslash/laravel-sharedsync - 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. cslash/laravel-sharedsync

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

cslash/laravel-sharedsync
=========================

Deploy Laravel projects to FTP/SFTP-only hosting with incremental updates.

0.2.3(1mo ago)065MITPHPPHP ^8.2

Since Apr 21Pushed 1mo agoCompare

[ Source](https://github.com/cslash/laravel-sharedsync)[ Packagist](https://packagist.org/packages/cslash/laravel-sharedsync)[ RSS](/packages/cslash-laravel-sharedsync/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (14)Versions (6)Used By (0)

Laravel SharedSync
==================

[](#laravel-sharedsync)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1e17d569b3a00bdd7f76e2fcdbaf74d4bb3eb7bb9fa7fb1bcb6c7442a635e9f2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63736c6173682f6c61726176656c2d73686172656473796e632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cslash/laravel-sharedsync)[![Total Downloads](https://camo.githubusercontent.com/322364c9a94a5f9e274526d0810c890fd50ac30722133bf14817a9a7f6a197d5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63736c6173682f6c61726176656c2d73686172656473796e632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cslash/laravel-sharedsync)[![Software License](https://camo.githubusercontent.com/e9318c04a1cc9540c92d7ea861577762e4081df21cb7631e577c30605f8df524/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f63736c6173682f6c61726176656c2d73686172656473796e632e7376673f7374796c653d666c61742d737175617265)](LICENSE)

SharedSync is a Laravel package designed for deploying applications to shared hosting environments where only FTP or SFTP access is available. It builds the project locally and performs incremental uploads to the remote server.

This package is aimed at Laravel developers who want to deploy their applications to shared hosting environments that only support FTP or SFTP (A notable example is OVH's shared hosting basic plan)

Features
--------

[](#features)

- Build project locally before deployment (Composer, NPM, Artisan cache).
- Incremental deployment using a manifest file (`.deploy-manifest.json`).
- Supports both FTP and SFTP.
- Configurable ignore rules (supports `.deployignore`).
- Dry-run mode to see changes before uploading.
- Selective deployment using the `--only` flag.
- Post-deployment remote health checks (storage permissions, symlinks, etc.).

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

[](#requirements)

- PHP 8.2+
- Laravel 10.0+
- FTP or SFTP access to your hosting provider.

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

[](#installation)

You can install the package via composer:

```
composer require cslash/laravel-sharedsync
```

Publish the configuration file:

```
php artisan vendor:publish --tag=sharedsync-config
```

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

[](#configuration)

Edit `config/sharedsync.php` with your server details. You can also use environment variables.

Example `.env` configuration:

```
SHAREDSYNC_DRIVER=ftp

FTP_HOST=ftp.example.com
FTP_USER=user@example.com
FTP_PASS=secret
FTP_ROOT=/public_html
FTP_PASSIVE=true
FTP_SSL=false

SFTP_HOST=sftp.example.com
SFTP_USER=user
SFTP_PASS=secret
SFTP_ROOT=/var/www/html
SFTP_PRIVATE_KEY=/path/to/id_rsa
SHAREDSYNC_URL=https://example.com
```

Example `config/sharedsync.php`:

```
'driver' => env('SHAREDSYNC_DRIVER', 'ftp'),

'ftp' => [
    'host' => env('FTP_HOST'),
    'username' => env('FTP_USER'),
    'password' => env('FTP_PASS'),
    'port' => env('FTP_PORT', 21),
    'root' => env('FTP_ROOT', '/'),
    'passive' => env('FTP_PASSIVE', true),
    'ssl' => env('FTP_SSL', false),
],

'sftp' => [
    'host' => env('SFTP_HOST'),
    'username' => env('SFTP_USER'),
    'password' => env('SFTP_PASS'),
    'port' => env('SFTP_PORT', 22),
    'root' => env('SFTP_ROOT', '/'),
    'privateKey' => env('SFTP_PRIVATE_KEY'),
],

'url' => env('SHAREDSYNC_URL'),
```

Important Note on Local Build
-----------------------------

[](#important-note-on-local-build)

The `composer` build step runs `composer install --no-dev --optimize-autoloader` in an isolated temporary directory. This ensures that your local development environment's `vendor` folder remains untouched and the current Artisan process is not affected by the removal of dev-dependencies.

This allows you to safely enable the `composer` build step in your configuration.

Usage
-----

[](#usage)

### Basic Deployment

[](#basic-deployment)

```
php artisan sharedsync:deploy
```

### Test Connection

[](#test-connection)

Test the connection to your remote server:

```
php artisan sharedsync:test
```

### List Remote Files

[](#list-remote-files)

List files on the remote server:

```
php artisan sharedsync:ls
```

Or list a specific directory:

```
php artisan sharedsync:ls path/to/directory
```

### Show Deployment Diff

[](#show-deployment-diff)

List files that will be uploaded or updated:

```
php artisan sharedsync:diff
```

### Dry Run

[](#dry-run)

See which files will be uploaded or deleted without actually performing the actions:

```
php artisan sharedsync:deploy --dry-run
```

### Force Deployment

[](#force-deployment)

Ignore the manifest and upload all files:

```
php artisan sharedsync:deploy --force
```

### Selective Deployment

[](#selective-deployment)

Only upload files from specific directories:

```
php artisan sharedsync:deploy --only=app,config,resources/views
```

### Remote Health Checks

[](#remote-health-checks)

Run health checks on the remote server to ensure permissions are correct and necessary symlinks exist:

```
php artisan sharedsync:check
```

These checks are also automatically performed at the end of every successful deployment.

### Remote Database Migrations

[](#remote-database-migrations)

Run database migrations on the remote server:

```
php artisan sharedsync:migrate
```

This command uses a temporary signed URL to securely trigger the migration on the remote server. Note that for this to work, both your local and remote environments must share the same `APP_KEY`.

How It Works
------------

[](#how-it-works)

1. **Build**: Creates an isolated temporary directory, copies the project (excluding `vendor`, `node_modules`, `.git`), and runs `composer install --no-dev`, `npm install`, `npm run build`.
2. **Scan**: Recursively scans the build directory, applying ignore rules.
3. **Compare**: Compares the scanned files against the last deployment manifest.
4. **Upload**: Connects via FTP/SFTP and uploads new or modified files from the build directory.
5. **Delete**: Removes files from the remote server that no longer exist in the build directory (if enabled).
6. **Manifest**: Updates the local `.deploy-manifest.json` file.
7. **Remote Checks**: Connects to the remote `/sharedsync` endpoint (secured with a temporary token) to verify storage permissions and ensure the `public/storage` symlink exists.
8. **Cleanup**: Deletes the temporary build directory and the remote security token.

License
-------

[](#license)

The MIT License (MIT).

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance92

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~14 days

Total

5

Last Release

37d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/64635508?v=4)[cslash](/maintainers/cslash)[@cslash](https://github.com/cslash)

---

Top Contributors

[![cscognamiglio](https://avatars.githubusercontent.com/u/11227537?v=4)](https://github.com/cscognamiglio "cscognamiglio (24 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cslash-laravel-sharedsync/health.svg)

```
[![Health](https://phpackages.com/badges/cslash-laravel-sharedsync/health.svg)](https://phpackages.com/packages/cslash-laravel-sharedsync)
```

###  Alternatives

[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77922.3M186](/packages/laravel-mcp)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k96.5k1](/packages/mike-bronner-laravel-model-caching)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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