Download the PHP package amirvahedix/laravel-deploy-ftp without Composer
On this page you can find all versions of the php package amirvahedix/laravel-deploy-ftp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download amirvahedix/laravel-deploy-ftp
More information about amirvahedix/laravel-deploy-ftp
Files in amirvahedix/laravel-deploy-ftp
Package laravel-deploy-ftp
Short Description A Laravel package to deploy files modified in Git to an FTP server based on commits, tags, or git status.
License MIT
Informations about the package laravel-deploy-ftp
Laravel FTP Deploy (amirvahedix/laravel-deploy-ftp)
A lightweight Laravel package to deploy files modified in Git (plus compiled assets like public/build) to any shared hosting or server via FTP/FTPS.
Features
- ๐ Git-based deployment: Deploy modified files based on Git commits, tags, or
git status. - ๐ Asset inclusion: Automatically includes compiled frontend assets (
public/build). - ๐ Exclusions: Automatically excludes sensitive
.envfiles,.git/,vendor/,node_modules/, and custom specified paths. - โ๏ธ Config &
.envdriven: Easily configured viaconfig/deploy-ftp.phpor.envvariables. - ๐งช Dry-run mode: Preview files to be uploaded before performing actual transfer.
- โ๏ธ Remote File Editing: Download and edit any file on the remote FTP host using
vim(or a custom editor) and re-upload automatically on save.
Installation
Install the package via Composer in any Laravel project:
(The package uses Laravel Service Discovery and will automatically register the deploy:ftp and deploy:ftp-edit Artisan commands).
Configuration
Publish the package configuration file to config/deploy-ftp.php:
Environment Variables (.env)
Add your FTP server details to your .env file:
Usage
1. FTP Deployment (deploy:ftp)
Run the deployment command:
Command Options
| Option | Description |
|---|---|
--all |
Deploy all tracked files (useful for initial deployment) |
--status |
Deploy modified and untracked files based on git status |
--from=COMMIT |
Starting Git commit or tag reference to diff from |
--to=COMMIT |
Ending Git commit (defaults to HEAD) |
--dry-run |
Print list of files that would be uploaded without connecting/uploading |
--host=HOST |
Override FTP host |
--user=USER |
Override FTP username |
--password=PASS |
Override FTP password |
--port=PORT |
Override FTP port (default: 21) |
--ssl |
Connect using SSL/TLS (FTPS) |
--root=PATH |
FTP remote root folder (e.g. /public_html) |
--tag=TAG |
Git tag to track the last deployed commit (default: deployed-latest) |
--push |
Push the deployment Git tag to remote Git origin |
--exclude=PATH |
Comma-separated list of additional files/directories to exclude |
Examples
Simulate a full deployment (Dry Run):
Deploy uncommitted / modified files from git status:
Deploy diff between HEAD~2 and HEAD:
2. Remote File Editor (deploy:ftp-edit)
Edit a file directly on the remote FTP host using vim (or any configured editor) and automatically re-upload it when saved:
If the file path argument is omitted, the command will interactively prompt you to enter the remote file path.
Command Options
| Option | Description |
|---|---|
file |
Relative path of the remote file to edit |
--editor=EDITOR |
The text editor binary to use (default: vim) |
--host=HOST |
Override FTP host |
--user=USER |
Override FTP username |
--password=PASS |
Override FTP password |
--port=PORT |
Override FTP port (default: 21) |
--ssl |
Connect using SSL/TLS (FTPS) |
--root=PATH |
FTP remote root folder (e.g. /public_html) |
Examples
Edit a remote file using Vim:
Edit a remote file using Nano or another editor:
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-deploy-ftp with dependencies
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/console Version ^10.0|^11.0|^12.0|^13.0