1. Go to this page and download the library: Download joro/typo3reversedeployment 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/ */
joro / typo3reversedeployment example snippets
$reverseDeploy = new \JoRo\Typo3ReverseDeployment();
/**
* Set server paths
*/
$reverseDeploy->setTypo3RootPath('/var/www/html/');
// optional: $reverseDeploy->setPhpPathAndBinary('/usr/local/bin/php_cli');
/**
* Connect to Server
*/
$reverseDeploy->setUser('USERNAME');
$reverseDeploy->setRemoteServer('example.org');
// optional: $reverseDeploy->setPrivateKey(getenv('HOME') . '/.ssh/id_rsa');
// optional: $reverseDeploy->setSshPort(222);
/**
* Get database
*/
$reverseDeploy->setSqlExcludeTable(['sys_log']);
$reverseDeploy->setSqlTarget("./tmp/");
$reverseDeploy->getDatabase();
/**
* Get fileadmin
*/
// optional - download only used files: $reverseDeploy->setFileadminOnlyUsed(true);
// optional - to download files in ddev docker container: $reverseDeploy->setLocalTempPath('/var/www/web/');
$reverseDeploy->setFileTarget("./fileadmin/");
$reverseDeploy->getFiles($ssh);
/**
* Connect to Server
*/
$reverseDeploy->setPrivateKeyPassphrase('mypassword');
$reverseDeploy->setUser('USERNAME');
$reverseDeploy->setRemoteServer('example.org');
/**
* Connect to Server
*/
$reverseDeploy->setPrivateKeyPassphrase(getenv('PASSPHRASE'));
$reverseDeploy->setUser('USERNAME');
$reverseDeploy->setRemoteServer('example.org');