Download the PHP package cocomedia-nl/laravel-webhosting-deploy without Composer

On this page you can find all versions of the php package cocomedia-nl/laravel-webhosting-deploy. 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 laravel-webhosting-deploy

Laravel Webhosting Deploy

Deploy a Laravel application to shared webhosting (DirectAdmin or TransIP) over SSH, with optional GitHub Actions.

Originally inspired by laravel-hostinger-deploy by TheCodeholic. Previously published as cocomedia-nl/laravel-directadmin-deploy.

Installation

This package is a development dependency: it is only needed on your machine (and in CI setup), not on the production server.

Quick start

A Laravel Prompts wizard asks:

  1. Target — DirectAdmin or TransIP
  2. SSH — host, username, port
  3. DirectAdmin — website folder (domains/{site}/laravel_html)
  4. TransIP — confirmation that the control panel DocumentRoot is /www/public
  5. APP_URL
  6. Database — SQLite or MySQL (MySQL credentials are written to the remote .env only)
  7. Whether to run migrations

The command then deploys the app, writes local WEBHOSTING_* settings, creates GitHub secrets (SSH_* and APP_PATH), and publishes .github/workflows/webhosting-deploy.yml.

Switching from a DirectAdmin test server to TransIP live is the same command: choose TransIP in the wizard. The previous test server can be retired afterwards.

Hosting layouts

DirectAdmin

TransIP

See Laravel on TransIP webhosting and DocumentRoot.

Override the app path with WEBHOSTING_APP_PATH (relative to the SSH home directory).

Commands

Command Alias (legacy) Purpose
webhosting:test-connection directadmin:test-connection Test SSH, inbound server-key login, server Git deploy key, and GitHub API without deploying
webhosting:deploy-and-setup-cicd directadmin:deploy-and-setup-cicd Wizard, deploy, GitHub secrets + workflow
webhosting:deploy directadmin:deploy Deploy only (wizard if SSH settings are missing)
webhosting:setup-cicd directadmin:setup-cicd Publish workflow and GitHub secrets
webhosting:publish-workflow directadmin:publish-workflow Write the workflow file locally

Useful options:

Environment variables

The wizard writes these to your local .env. Existing DIRECTADMIN_* keys still work as fallbacks.

Variable Required Description
WEBHOSTING_DRIVER No (default directadmin) directadmin or transip
WEBHOSTING_SSH_HOST Yes SSH hostname or IP
WEBHOSTING_SSH_USERNAME Yes SSH username
WEBHOSTING_SSH_PORT No (default 22) SSH port
WEBHOSTING_SITE_DIR DirectAdmin only Domain folder name
WEBHOSTING_APP_PATH No Override remote app path from $HOME
GITHUB_API_TOKEN For automated secrets PAT with Administration + Secrets write

Database credentials are not stored locally and are not added as GitHub secrets.

GitHub Actions

Published file: .github/workflows/webhosting-deploy.yml

Secrets created by webhosting:setup-cicd:

Review, commit, and push the workflow yourself. Subsequent pushes deploy with git reset, composer install, migrate, and cache commands. CI does not recreate the DirectAdmin public_html symlink (that happens on the first Artisan deploy).

SSH keys

Two different authorizations are involved:

  1. Outbound (git fetch) — the server public key as a GitHub deploy key. Setup via API when GITHUB_API_TOKEN is set.
  2. Inbound (GitHub Actions) — that same key in authorized_keys, so CI can SSH in with secret SSH_KEY.

On DirectAdmin, writing ~/.ssh/authorized_keys is often not enough. sshd may ignore the file (StrictModes with a group-writable home, or a panel-managed key list). Authorize the same public key in DirectAdmin: Advanced Features → SSH Keys, with Authorize / Allow login enabled. That panel step cannot be automated without DirectAdmin login credentials, which this package does not store.

webhosting:setup-cicd and webhosting:test-connection verify whether the server key is actually accepted for login, and print the public key plus panel steps when it is not.

Your local SSH login (password or your own key) is separate from the server key CI uses.

Requirements

Migrating from laravel-directadmin-deploy

Existing apps that require cocomedia-nl/laravel-directadmin-deploy stay on 0.1.8 until you switch. composer update will not pick up this package automatically.

Per project:

License

MIT


All versions of laravel-webhosting-deploy with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/console Version ^11.0|^12.0|^13.0
illuminate/process Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
laravel/prompts Version ^0.1.25 || ^0.2 || ^0.3
symfony/console Version ^7.0
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 cocomedia-nl/laravel-webhosting-deploy contains the following files

Loading the files please wait ...