PHPackages                             allestuetsmerweh/php-deploy - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. allestuetsmerweh/php-deploy

ActiveLibrary[File &amp; Storage](/categories/file-storage)

allestuetsmerweh/php-deploy
===========================

Deploy your PHP code to a shared hoster

2.9(3mo ago)132.0k↑100%[1 issues](https://github.com/allestuetsmerweh/php-deploy/issues)MITPHPPHP &gt;=8.2CI passing

Since Jan 3Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/allestuetsmerweh/php-deploy)[ Packagist](https://packagist.org/packages/allestuetsmerweh/php-deploy)[ Docs](https://github.com/allestuetsmerweh/php-deploy)[ RSS](/packages/allestuetsmerweh-php-deploy/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (24)Used By (0)

php-deploy
==========

[](#php-deploy)

Deploy your PHP code, e.g. to a shared hosting.

The only requirement on the deployment destination server is PHP and [the ZIP extension](https://www.php.net/manual/en/zip.setup.php).

Usage
-----

[](#usage)

- `composer require allestuetsmerweh/php-deploy`
- Create a file `Deploy.php`, containing a class implementing `AbstractDefaultDeploy` (or `AbstractDeploy`)
- Run `PASSWORD=$DEPLOY_PASSWORD php ./Deploy.php --target=host1 --environment=prod --username=$DEPLOY_USERNAME` to deploy

Filesystem structure on the deployment destination server
---------------------------------------------------------

[](#filesystem-structure-on-the-deployment-destination-server)

Definitions:

- `$SECRET_ROOT`: The root directory for content not to be accessible via HTTP(S).
- `$PUBLIC_ROOT`: The root directory for content to be accessible via HTTP(S).
- `$DEPLOY_DIR`: The directory name for the deployments. Default: `deploy`.
- `$RANDOM_DIR`: A random name for a directory, which does not exist yet in the parent directory.

Usages:

- `$PUBLIC_ROOT/$RANDOM_DIR/deploy.zip`: The zipped contents of the deployment.
- `$PUBLIC_ROOT/$RANDOM_DIR/deploy.php`: The script to unzip and install the deployment.
- `$SECRET_ROOT/$DEPLOY_DIR/candidate/`: The directory to unzip the deployment to
- `$SECRET_ROOT/$DEPLOY_DIR/live/`: The directory where the current deployment is stored
- `$SECRET_ROOT/$DEPLOY_DIR/previous/`: The directory where the previous deployment is stored

CI on github.com
----------------

[](#ci-on-githubcom)

Example `.github/workflows/deploy-prod.yml`:

```
on:
  push:
    branches:
      - main
name: Deploy:prod
jobs:
  # TODO: Tests

  deploy-prod:
    name: Deploy to my-domain.com
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: shivammathur/setup-php@v2
      with:
        php-version: '8.1'
    - name: Get composer cache directory
      id: composer-cache
      run: echo "::set-output name=dir::$(composer config cache-files-dir)"
    - name: Cache dependencies
      uses: actions/cache@v1
      with:
        path: ${{ steps.composer-cache.outputs.dir }}
        key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
        restore-keys: ${{ runner.os }}-composer-
    - name: Install dependencies
      run: composer install --prefer-dist
    - name: Deploy
      env:
        USERNAME: ${{ secrets.DEPLOY_USERNAME }}
        PASSWORD: ${{ secrets.DEPLOY_PASSWORD }}
      run: php ./Deploy.php --target=host1 --environment=prod --username="$USERNAME"

```

CI on bitbucket.org
-------------------

[](#ci-on-bitbucketorg)

Example `bitbucket-pipelines.yml`:

```
image: php:8.1.1
pipelines:
  default:
    - parallel:
      - step:
          name: 'Build and Test'
          script:
            - echo "Your build and test goes here..."
      - step:
          name: 'Lint'
          script:
            - echo "Your linting goes here..."
      - step:
          name: 'Security scan'
          script:
            - echo "Your security scan goes here..."

    - step:
        name: 'Deployment to Production'
        deployment: production
        trigger: 'manual'
        script:
          - apt-get update && apt-get install -y libzip-dev
          - docker-php-ext-install zip
          - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
          - composer install
          - PASSWORD=$DEPLOY_PASSWORD php ./Deploy.php --target=host1 --environment=prod --username=$DEPLOY_USERNAME

```

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance62

Regular maintenance activity

Popularity29

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~71 days

Recently: every ~237 days

Total

22

Last Release

94d ago

Major Versions

1.0.9 → 2.0.02022-08-29

PHP version history (3 changes)1.0.1PHP &gt;=7.4

2.0.0PHP &gt;=8.1

2.7.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/a75abf5174d3271e28fd3effef0394b1396739198f53405952f523fe6dc301fc?d=identicon)[allestuetsmerweh](/maintainers/allestuetsmerweh)

---

Top Contributors

[![allestuetsmerweh](https://avatars.githubusercontent.com/u/12112442?v=4)](https://github.com/allestuetsmerweh "allestuetsmerweh (40 commits)")

---

Tags

phpftpsftpuploaddeployftpsshared hoster

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/allestuetsmerweh-php-deploy/health.svg)

```
[![Health](https://phpackages.com/badges/allestuetsmerweh-php-deploy/health.svg)](https://phpackages.com/packages/allestuetsmerweh-php-deploy)
```

###  Alternatives

[league/flysystem

File storage abstraction for PHP

13.6k639.1M2.2k](/packages/league-flysystem)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[brunodebarros/git-deploy-php

git-deploy-php is a simple php-based tool that deploys your Git repositories to FTP/SFTP servers, and keeps them updated automatically.

2921.2k](/packages/brunodebarros-git-deploy-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
