{"id":21364848,"url":"https://github.com/fbn/lift","last_synced_at":"2025-06-25T02:04:57.779Z","repository":{"id":21996055,"uuid":"25321093","full_name":"FbN/lift","owner":"FbN","description":"PHP script for quick sync with FTP server.","archived":false,"fork":false,"pushed_at":"2014-11-12T23:19:41.000Z","size":624,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-16T07:28:31.316Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://fbn.github.io/lift","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FbN.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-16T20:47:44.000Z","updated_at":"2020-10-30T02:07:20.000Z","dependencies_parsed_at":"2022-08-18T16:50:48.602Z","dependency_job_id":null,"html_url":"https://github.com/FbN/lift","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FbN/lift","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FbN%2Flift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FbN%2Flift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FbN%2Flift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FbN%2Flift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FbN","download_url":"https://codeload.github.com/FbN/lift/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FbN%2Flift/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261789229,"owners_count":23209774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T07:07:57.689Z","updated_at":"2025-06-25T02:04:57.757Z","avatar_url":"https://github.com/FbN.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"#lift\n\n## What and Why\n\nLift is a PHP script for quick sync with FTP server.\n\nThe world is full of wonderfull tecnology that helps you deploy your project in marvelous ways: ssh tools, cloud API, docker, git deploy, bla bla bla. \n\nUnfortunately happens that you are stuck with an prehistoric shared PHP/MYSQL server that can offer you only FTP access.\n\nIf this is the scene and your project it's fat, keeping the server in sync can be very tedious. Well, FTP clients come in your help with tools to compare files before update but the process can be very slow (especially if you play with composer and your file date/time mod time is not trustable).\n\nLift can speed up your \"old school\" project deployment by keeping a local index of remote files status. \nWhen the local index is not trustable (remote files changed by other way ecc.) Lift can rescan remote server using a PHP script with great time benefits.\n\n## Install and Configure\n\n### Download the phar on your project root\n\nDownload from this url: https://github.com/FbN/lift/raw/master/lift.phar and save it in your project root\n\n```\nmyproject\u003e curl -O https://github.com/FbN/lift/raw/master/lift.phar\n```\n\n### Test it\n\n```\nmyproject\u003e php lift.phar\n```\n\nIf all is working you will see the lift help.\n\n### Configure\n\nNow you have Lift ready for use but first you have to configure it.\n\nCreate a json file named lift.json in your project root\n\n```\n\u003e vi lift.json\n```\n\nCopy this json and edit it to feet your server and needs\n\n```javascript\n{\n    \"hosts\": {\n        \"prod\": {\n        \t\"host\": \"mybudgetphpserver.com\",\n        \t\"username\": \"myftpuser\",\n        \t\"password\": \"myftppassword\",\n        \t\"folder\": \"/httpdocs\",\n        \t\"url\": \"http://mybudgetphpserver.com\",\n        \t\"remote-script-name\": \"_r.php\"\n        },\n        \"staging\": {\n        \t\"host\": \"192.168.1.1\",\n        \t\"username\": \"myftpuser\",\n        \t\"password\": \"myftppassword\",\n        \t\"folder\": \"/httpdocs\",\n        \t\"url\": \"http://testserver.lan\",\n        \t\"remote-script-name\": \"_r.php\"\n        }\n    },\n    \"defaut-host\": \"prod\",\n    \"ignore\": [\n    \t\"/.\",\n    \t\"^/lift.\"\n    \t\"^/composer.\"\n    ]\n}\n```\n\nIn this JSON sample we have declared two servers to sync. When you call lift if you not specify the server to use it will choose the one specified in by \"default-host\" options.\n\nServer configuration is obvious (host, login, password bla bla bla). In \"folder\" you have to specify the web root folder, typically is \"/httpdocs\". \n\n\"remote-script-name\" is the name Lift give to the script it upload for remote scan. It will uploaded, called prefixing it with the url you write on \"url\" and than delete it.\n\nLast there is the ignore section. There you configure rules to ignore files that not must be uploaded.\n\nThe rules are very simple, by examples:\n\n```\n^/lift.\n```\nIgnore any file path starting with \"/lift.\". So a file named \"lift.json\" or \"lift.phar\" in your project root will be ignored.\n\n```\n.tmp$\n```\nWill ignore any file path ending with \".tmp\"\n\n```\n_inc.\n```\nWill ignore any file path containing '_inc.'\n\nN.B. By file path Lift assume an absolute path starting from your project root.\n\n## Use it\n\nSimply run\n\n```\n\u003e php lift.phar sync --remote-index\n```\n\nLift will reindex the remote FTP server content uploading a tempory PHP script and than will upload only the changed files. The remote indexing is not necessary every time. If you are sure noone have changed the remote files afer your last sync you can run it withoute the \"--remote-index\" option getting a better performance.\n\nOther options upported are:\n\n```\n --defaut-host (-H)    Host name to upload.\n --remote-index        Dom't trust index. Remote check files status.\n --pretend (-p)        Pretend, do nothing.\n --check-time          Lift compare files by md5 checksums. If you can trust your files modification time, you can                           speedup the upload. Can be used with check-size.\n --list-new            New files\n --list-modified       Changed files\n```\n\n## License\nMIT License http://opensource.org/licenses/MIT\n\n## The End\nLift is in embrional status. It seems to work but a lot of work can be done do improve It. So star the page and keep an eye on it :).\n\nFabiano Taioli\nftaioli@gmail.com\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffbn%2Flift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffbn%2Flift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffbn%2Flift/lists"}