1. Go to this page and download the library: Download aerni/sync library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
aerni / sync example snippets
return [
/*
|--------------------------------------------------------------------------
| Remotes
|--------------------------------------------------------------------------
|
| Define on or more remotes you want to sync with.
| Each remote is an array with 'user', 'host', 'root', and optional 'port'.
|
*/
'remotes' => [
// 'production' => [
// 'user' => 'forge',
// 'host' => '104.26.3.113',
// 'port' => 1431,
// 'root' => '/home/forge/statamic.com',
// 'read_only' => false,
// ],
],
/*
|--------------------------------------------------------------------------
| Recipes
|--------------------------------------------------------------------------
|
| Define one or more recipes with the paths you want to sync.
| Each recipe is an array of paths relative to your project's root.
|
*/
'recipes' => [
// 'assets' => ['storage/app/assets/', 'storage/app/img/'],
],
/*
|--------------------------------------------------------------------------
| Options
|--------------------------------------------------------------------------
|
| An array of default rsync options.
| You can override these options when executing the command.
|
*/
'options' => [
'--archive',
],
];