Download the PHP package rnsharma93/lara-ftp-deployer without Composer

On this page you can find all versions of the php package rnsharma93/lara-ftp-deployer. 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 lara-ftp-deployer

Lara FTP Deployer

There are many excellent CI/CD tools available for VPS, cloud, or managed servers. But what about shared hosting where you don't have SSH access or the ability to run commands on the server? In that case, deploying day-to-day Laravel application changes becomes a very difficult and tedious task.

Lara FTP Deployer comes to the rescue to solve exactly this issue. You can deploy your changes securely via FTP with a single artisan command. Not only does it upload your files, but this single command can also run your configured set of Artisan commands (from migrate to optimize:clear) directly on the shared hosting server!

Furthermore, you can instantly stream, watch, and securely download your remote application logs directly from your terminal, treating your shared host like it has native SSH access.

Deploying via FTP doesn't have to be agonizingly slow. This package solves the traditional FTP bottleneck by zipping your application, uploading it as a single chunk, and extracting it blazingly fast directly on your live server using native PHP ZipArchive functions.

It intelligently detects what changed locally and only deploys the exact modified files using lightning-fast Git Diff analysis, falling back safely to MD5 hash tracking if Git isn't available.

Features


Requirements


Installation

Install the package into your Laravel project via Composer:

Publish the configuration file (which copies it to config/deployer.php):


Configuration

Open .env and configure your default target server credentials securely:

Multi-Environment Support

You can define unlimited stages inside config/deployer.php (e.g., production, staging, testing). Just define them in the array and use variables like DEPLOYER_STAGING_FTP_HOST in your .env appropriately.

Example configuring Staging and Production in .env:


How it Tracks Changes

The deployer intelligently utilizes two tracking methods to avoid uploading thousands of files:

1. Git Diff Tracking (Recommended)

Enabled securely by default if Git is initialized. The system reads the last historically deployed commit hash saved on the live server (deploy-meta.json) and compares it against your local HEAD commit. Uncommitted files are safely ignored! Only strictly committed modifications will deploy. Enable via .env: DEPLOY_INCREMENTAL_GIT=true

2. Hash Tracking (Fallback)

If git_enabled is set to false or Git is entirely missing from your system, the script instantly evaluates your base_path(), computes instantaneous MD5 hashes, and evaluates the changes perfectly.


Exclude Files & Folders

There are files that should logically never be copied into your production zip package. You can configure what paths to automatically block inside config/deployer.php.

(Note: Even though the storage folders are heavily excluded from tracking scanning for performance, the deployment zip will still gracefully ensure these empty frameworks exist on first deployments!)


Usage

🚀 1. The Initial Deployment

If you are deploying a fresh project to a blank server, use the --init flag. This bypasses tracking checks, pulls your fully localized config, sets up storage/ directory definitions, builds your NPM assets, uploads a remote web-extractor, and zips the comprehensive root structure completely.

Once extracted, you can jump onto your server to simply define your remote .env variables and hook up the Database!

🚀 2. Standard Incremental Deployments

For your day-to-day deployments, just run the default command:

What it does behind the scenes:

  1. Triggers npm run build seamlessly.
  2. Quickly computes what was locally modified/deleted.
  3. Bundles them in a Zip archive weighing a few kilobytes.
  4. FTP uploads the tight package.
  5. Remotely commands the Laravel server API endpoint to extract the files, perform automatic File Deletions, and run your automated artisan server hooks!

🌍 3. Target Alternative Environments

Deploy to staging environment configured in config/deployer.php:


Advanced Flags & Controls

Modify your deployment operations using these terminal flags for granular control:

Example:


Remote Commands

Need to clear the cache remotely, optimize, or migrate the server database immediately? You can talk seamlessly to the remote API directly from your terminal.

Note: The server-side runner gracefully captures terminal streams, so output is perfectly mapped over HTTP back to your local IDE in real-time.


Remote Log Streaming

When bugs happen on a shared host, SSHing in to check laravel.log isn't an option. The ftp:logs command utilizes lightning-fast pooling to stream remote files directly into your local terminal in beautifully color-coded text.

1. Tail the Default Log Instantly view the last 100 lines of storage/logs/laravel.log:

2. Watch the Server Log Live Watch the log file continuously. Every 3 seconds it securely queries the FTP server for new bytes (it does not download the whole file repeatedly!) and streams it directly to your CLI:

3. Tail Custom Paths Specify exactly how many lines you want from other log files relative to storage/logs/:

4. Safely Download Huge Logs If a file is extremely large, streaming can be hazardous. The --download flag instantly checks the filesize metadata on the server. If it is over 5MB, it warns you first. It then downloads it securely to your local machine (storage/logs/laravel-server.log):


Customizing Automated Commands

After a zip is successfully extracted on the server, the config sequentially triggers remote hooks immediately. You can define what hits the server after deploying via config/deployer.php in the remote environments list:

Enjoy lightning-fast deployments!


👨‍💻 Developed By

Ram Sharma

If you find this package helpful in your daily deployment workflow, please consider starring the repository on GitHub!


📜 License & Open Source

The Lara FTP Deployer package is open-source software licensed under the MIT license.

You are completely free to use, modify, and distribute this package in both personal and commercial projects. Contributions, issues, and feature requests are always welcome! Feel free to check the issues page if you want to contribute.


All versions of lara-ftp-deployer with dependencies

PHP Build Version
Package Version
No informations.
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 rnsharma93/lara-ftp-deployer contains the following files

Loading the files please wait ...