PHPackages                             marceli-to/statamic-sync - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. marceli-to/statamic-sync

ActiveLibrary[File &amp; Storage](/categories/file-storage)

marceli-to/statamic-sync
========================

Sync Statamic content and assets from remote environments to local.

v0.6.0(1mo ago)034MITPHPPHP ^8.1

Since Feb 19Pushed 1mo agoCompare

[ Source](https://github.com/marceli-to/statamic-sync)[ Packagist](https://packagist.org/packages/marceli-to/statamic-sync)[ RSS](/packages/marceli-to-statamic-sync/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (2)Versions (7)Used By (0)

Statamic Sync
=============

[](#statamic-sync)

Pull Statamic content and assets from a remote environment to your local setup — no FTP, no SSH, just one artisan command.

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

[](#how-it-works)

1. The package exposes a protected endpoint on your remote site
2. When you run `statamic:pull`, it compares local and remote files via hash manifests
3. Only new, changed, and deleted files are synced — unchanged files are skipped
4. Files are streamed as compressed tar.gz archives directly from the server

First run downloads everything. Subsequent runs only sync the diff.

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

[](#requirements)

- PHP 8.1+
- Laravel 10, 11, 12, or 13
- `tar` available on both server and local machine (standard on Linux/macOS)

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

[](#installation)

Install the package on **both** your local and remote environments:

```
composer require marceli-to/statamic-sync
```

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

[](#configuration)

Publish the config (optional — defaults work out of the box):

```
php artisan vendor:publish --tag=statamic-sync-config
```

### Environment Variables

[](#environment-variables)

**Both environments** (local + remote):

```
STATAMIC_SYNC_TOKEN=your-shared-secret-here
```

Generate a secure token:

```
openssl rand -hex 32
```

**Local environment only:**

```
STATAMIC_SYNC_REMOTE=https://your-production-site.com
```

Usage
-----

[](#usage)

### Pull everything (content + assets)

[](#pull-everything-content--assets)

```
php artisan statamic:pull
```

### Pull only content

[](#pull-only-content)

```
php artisan statamic:pull --only=content
```

### Pull only assets

[](#pull-only-assets)

```
php artisan statamic:pull --only=assets
```

### Dry run (see what would change)

[](#dry-run-see-what-would-change)

```
php artisan statamic:pull --dry-run
```

Output shows exactly what would happen:

```
content:
  Unchanged: 52 files
  Changed:   3 files
  New:       2 files
  Deleted:   1 files
  Download:  12.5 KB

assets:
  Unchanged: 820 files
  New:       3 files
  Download:  4.2 MB

```

### Force full sync (skip delta comparison)

[](#force-full-sync-skip-delta-comparison)

```
php artisan statamic:pull --full
```

### Skip confirmation

[](#skip-confirmation)

```
php artisan statamic:pull --force
```

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

[](#configuration-options)

```
// config/statamic-sync.php

return [
    // Shared secret for authentication (required on both sides)
    'token' => env('STATAMIC_SYNC_TOKEN', ''),

    // Remote URL to pull from (local side only)
    'remote' => env('STATAMIC_SYNC_REMOTE', ''),

    // Directories to sync (relative to project root)
    'paths' => [
        'content' => 'content',
        'assets' => 'public/assets',
    ],

    // URL prefix for the sync endpoint
    'route_prefix' => '_sync',

    // Optional IP whitelist (empty = allow all, token still required)
    'allowed_ips' => [],
];
```

Updating
--------

[](#updating)

Update only this package:

```
composer update marceli-to/statamic-sync
```

Remember to update on **both** local and remote when upgrading.

Security
--------

[](#security)

- All requests require a valid bearer token
- Optional IP whitelisting for additional protection
- Use a strong, unique token — `openssl rand -hex 32`
- The sync endpoints are only accessible with a valid token
- Directory traversal protection on file serving

License
-------

[](#license)

MIT

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance92

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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 ~17 days

Total

6

Last Release

40d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/52077649?v=4)[marceli.to](/maintainers/marceli-to)[@marceli-to](https://github.com/marceli-to)

---

Top Contributors

[![marceli-to](https://avatars.githubusercontent.com/u/52077649?v=4)](https://github.com/marceli-to "marceli-to (7 commits)")

### Embed Badge

![Health badge](/badges/marceli-to-statamic-sync/health.svg)

```
[![Health](https://phpackages.com/badges/marceli-to-statamic-sync/health.svg)](https://phpackages.com/packages/marceli-to-statamic-sync)
```

###  Alternatives

[rahulhaque/laravel-filepond

Use FilePond the Laravel way

264127.9k2](/packages/rahulhaque-laravel-filepond)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135212.4k7](/packages/statamic-rad-pack-runway)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21313.7k3](/packages/ecotone-laravel)[slimani/filament-media-manager

A media manager plugin for Filament.

115.1k](/packages/slimani-filament-media-manager)

PHPackages © 2026

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