Download the PHP package jorisnoo/craft-remote-sync without Composer

On this page you can find all versions of the php package jorisnoo/craft-remote-sync. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package craft-remote-sync

Remote Sync for Craft CMS

A Craft CMS module that syncs databases and storage files between remote and local environments over SSH and rsync.

Craft CMS 5 PHP 8.2+ License


Features


Requirements

Version
Craft CMS 5.x
PHP 8.2+
Local tools ssh, rsync, and the database client/dump tools (mysql+mysqldump or psql+pg_dump)
Remote tools ssh, rsync, and a PHP binary that satisfies the project. If the default php does not, expose a versioned binary such as php8.4 on PATH and it is detected automatically, or pin one with php_binary.

Run craft remote-sync/doctor to check everything is in place.


Installation

Register it as a module in config/app.php:

The bootstrap entry is required so the module registers its console controllers.


Configuration

Copy the config file into your project and edit it:

Each remote needs a host (an SSH connection string, optionally user@host:port) and a path (the Craft app root on the server). For an atomic deployment, point path at the release parent; a /current symlink is detected and used automatically. Pushing is refused unless push is true.

The env var names follow REMOTE_SYNC_{REMOTE}_{KEY}, so a staging remote reads REMOTE_SYNC_STAGING_HOST and REMOTE_SYNC_STAGING_PATH.


Usage

Pull (remote → local)

Without flags it asks which remote and what to sync, verifies the host key, probes the remote, prints the plan, and asks for confirmation. For the database it backs up your local database (pre-pull-*), takes a snapshot on the remote, downloads and restores it, then runs craft up and clears caches. For files it rsyncs each configured path.

Push (local → remote)

Push requires the remote to have push enabled, always asks for a typed yes confirmation, and needs an explicit scope when run non-interactively. It backs up the remote database (pre-push-*) before uploading and restoring your local one, then runs craft up on the remote.

Doctor

Checks local tools and, per remote, the host key, application path, PHP binary, and rsync.

Prune

Deletes old snapshots created by this module, keeping the newest --keep. It leaves snapshots it did not create alone unless --all is given.


Backups and snapshots

Two kinds of database file are involved:

Both live in Craft's standard storage/backups directory. Skip the safety backup with --no-backup, and delete the downloaded snapshot once it has been imported with --discard-snapshot. Kept snapshots are subject to remote-sync/prune, which keeps the newest five by default.

A push cleans up both copies of its transfer snapshot, local and remote. Only a pull leaves one behind.

A pull or push refuses to run when the local environment is production, unless you set allow_production to true.


Versioning

This module is maintained on separate branches for each major Craft CMS version:

Branch Craft CMS PHP
main 5.x 8.2+
craft-4 4.x 8.1+

Upgrading from 2.x? See UPGRADING.md for the config and command changes.


License

MIT — see LICENSE for details.

Maintainer releases

See RELEASING.md for versioning, changelog entries and the release command.


All versions of craft-remote-sync with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
craftcms/cms Version ^5.0
laravel/prompts Version ^0.3
symfony/process Version ^6.4 || ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jorisnoo/craft-remote-sync contains the following files

Loading the files please wait ...