PHPackages                             zephir/kirby-contentsync - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. zephir/kirby-contentsync

ActiveKirby-plugin[Utility &amp; Helpers](/categories/utility)

zephir/kirby-contentsync
========================

Kirby contentsync plugin

2.1.0(2y ago)543.3k—8.9%2[2 issues](https://github.com/zephir/kirby-contentsync/issues)[1 PRs](https://github.com/zephir/kirby-contentsync/pulls)MITPHP

Since Jul 18Pushed 2y ago3 watchersCompare

[ Source](https://github.com/zephir/kirby-contentsync)[ Packagist](https://packagist.org/packages/zephir/kirby-contentsync)[ RSS](/packages/zephir-kirby-contentsync/feed)WikiDiscussions main Synced yesterday

READMEChangelog (4)Dependencies (4)Versions (5)Used By (0)

Kirby Contentsync plugin
========================

[](#kirby-contentsync-plugin)

[![cover](docs/content-sync.gif)](docs/content-sync.gif)

Tired of manual and cumbersome methods like git push/pull, scp, rsync, or sftp to synchronize content between your server and local development environment?
Embrace a seamless and efficient syncing solution with Contentsync.

> This plugin requires [Kirby 3/4](https://getkirby.com), [Kirby CLI](https://github.com/getkirby/cli) and PHP 8 or higher to work.

Table of Contents
-----------------

[](#table-of-contents)

- [Kirby Contentsync plugin](#kirby-contentsync-plugin)
    - [Table of Contents](#table-of-contents)
    - [1. Installation](#1-installation)
        - [1.1 Composer](#11-composer)
        - [1.2 Download](#12-download)
        - [1.3 Git submodule](#13-git-submodule)
    - [2. Setup](#2-setup)
    - [3. Options](#3-options)
        - [3.1 enabledRoots](#31-enabledroots)
        - [3.2 Example config entry](#32-example-config-entry)
    - [4. Usage](#4-usage)
    - [5. How does it work?](#5-how-does-it-work)
    - [6. Caveats](#6-caveats)
    - [License](#license)
    - [Credits](#credits)

1. Installation
---------------

[](#1-installation)

The recommended way of installing is by using Composer.

### 1.1 Composer

[](#11-composer)

```
composer require zephir/kirby-contentsync

```

### 1.2 Download

[](#12-download)

Download and copy this repository to `/site/plugins/kirby-contentsync`.

### 1.3 Git submodule

[](#13-git-submodule)

```
git submodule add https://github.com/zephir/kirby-contentsync.git site/plugins/kirby-contentsync

```

2. Setup
--------

[](#2-setup)

After installation, you simply have to configure the [Options](#3-options), deploy the updated site to the server, and use [the Kirby command](#4-usage).

3. Options
----------

[](#3-options)

OptionTypeDefaultRequiredDescriptionsourcestringnull✅Source of the content, normally the staging/prod server. URL of the host (e.g. )tokenstringnull✅The authentication token, make sure this token is not accessible by the public. Either use an env file/variable or use a private git repository.enabledRootsarray[see below](#31-enabledroots)❌Which roots should be synchronized by the plugin. You can see all [available roots here.](https://getkirby.com/docs/guide/configuration#custom-folder-setup__all-configurable-roots)### 3.1 enabledRoots

[](#31-enabledroots)

To support different types of folder structures we use the `kirby()->roots()` function (hence the name of the option). The plugin supports synchronizing all Kirby root paths. By default, the plugin is configured to sync the `accounts` and `content` roots.

```
[
    'accounts' => true,
    'content' => true
]
```

### 3.2 Example config entry

[](#32-example-config-entry)

```
'zephir.contentsync' => [
    'source' => 'https://getkirby.com',
    'token' => 'abc123',
    'enabledRoots' => [
        'license' => true // also sync license
    ]
]
```

4. Usage
--------

[](#4-usage)

Kirby CLI Command:

`kirby content:sync`

With verbose logging:

`kirby content:sync -v`

5. How does it work?
--------------------

[](#5-how-does-it-work)

The plugin creates 2 endpoints (routes):

1. `/contentsync/files`: Returns a list of all files in the enabled roots.
2. `/contentsync/file/:fileId`: Returns the contents of the requested file.

> If you don't set up a token the endpoints won't work.

Each file returned by `files` has an ID (sha1 hash of root name + path), a path (relative to Kirby root), a Kirby root name, and a checksum of the file contents.

The plugin compares the retrieved file list with a file list of local files. It automatically deletes local files that aren't in the server list, creates the ones that aren't local but in the server list, and updates the ones with different checksums.

It doesn't sync files that haven't changed.

6. Caveats
----------

[](#6-caveats)

1. Since we download each file individually, it is possible that a WAF / Firewall will block the requests. You can add an exception for the endpoints.
2. Generating the checksum can put a bit of load on the server, especially for large files. But for "normal" websites it should be fine - even if you have several gigabytes of data / many files.
3. Because we serve all files through PHP and a web endpoint, downloads of large files (200MB+) may be stopped by the server hoster (especially with shared hosting).

License
-------

[](#license)

MIT

Credits
-------

[](#credits)

- [Zephir](https://zephir.ch)
- [Marc Stampfli](https://github.com/themaaarc)

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96% 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 ~70 days

Total

4

Last Release

869d ago

Major Versions

1.0.0 → 2.0.02023-10-27

### Community

Maintainers

![](https://www.gravatar.com/avatar/c251141fefe231cafe49879d56856f173d9363e1e21c77bad7e0dd4957125c42?d=identicon)[Zephir Software Design](/maintainers/Zephir%20Software%20Design)

---

Top Contributors

[![TheMaaarc](https://avatars.githubusercontent.com/u/3450438?v=4)](https://github.com/TheMaaarc "TheMaaarc (24 commits)")[![luxuryluke](https://avatars.githubusercontent.com/u/57873?v=4)](https://github.com/luxuryluke "luxuryluke (1 commits)")

### Embed Badge

![Health badge](/badges/zephir-kirby-contentsync/health.svg)

```
[![Health](https://phpackages.com/badges/zephir-kirby-contentsync/health.svg)](https://phpackages.com/packages/zephir-kirby-contentsync)
```

###  Alternatives

[getkirby/cms

The Kirby core

1.5k584.8k472](/packages/getkirby-cms)[medienbaecker/kirby-modules

Easily add modules to your pages

895.5k1](/packages/medienbaecker-kirby-modules)[medienbaecker/kirby-alter

242.1k](/packages/medienbaecker-kirby-alter)

PHPackages © 2026

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