PHPackages                             klytron/php-deployment-kit - 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. [API Development](/categories/api)
4. /
5. klytron/php-deployment-kit

ActiveLibrary[API Development](/categories/api)

klytron/php-deployment-kit
==========================

A comprehensive deployment library for PHP applications built on Deployer. Supports Laravel, Yii2, and simple PHP applications.

v1.0.3(1mo ago)05MITPHPPHP ^8.1

Since Feb 25Pushed 1mo agoCompare

[ Source](https://github.com/klytron/php-deployment-kit)[ Packagist](https://packagist.org/packages/klytron/php-deployment-kit)[ Docs](https://github.com/klytron/php-deployment-kit)[ Fund](https://www.klytron.com/buy-me-a-coffee)[ RSS](/packages/klytron-php-deployment-kit/feed)WikiDiscussions main Synced 1mo ago

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

PHP Deployment Kit
==================

[](#php-deployment-kit)

[![Latest Version on Packagist](https://camo.githubusercontent.com/12e716d12d7aac1b5fcd3d1ad672f66ce4d5a02ccd49c800676e60c12fe0e43f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6c7974726f6e2f7068702d6465706c6f796d656e742d6b69742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/klytron/php-deployment-kit)[![Total Downloads](https://camo.githubusercontent.com/9c294768471418dc5bc4b6fe495eef152a32cf9fb80c32086719c8c1f57e37f3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6c7974726f6e2f7068702d6465706c6f796d656e742d6b69742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/klytron/php-deployment-kit)[![PHP Version](https://camo.githubusercontent.com/407cae97f462622b426bac8a038a78696841ce2f26cf8caaf5059c90b8f729b7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312532422d626c75652e7376673f7374796c653d666c61742d737175617265)](https://php.net)[![Deployer](https://camo.githubusercontent.com/e0702e24738568fce0b04328a2896879b5d2db6858277a624852de1deb48ffe2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4465706c6f7965722d372e782d677265656e2e7376673f7374796c653d666c61742d737175617265)](https://deployer.org)[![License](https://camo.githubusercontent.com/1b01ef0024ba0866c115986b895301f657c1b21fc29f05c4844b7f2e8d89204d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e7376673f7374796c653d666c61742d737175617265)](LICENSE)

> A comprehensive deployment library for PHP applications built on [Deployer](https://deployer.org). Supports **Laravel**, **Yii2**, **API projects**, and **simple PHP** applications with zero boilerplate.

---

Features
--------

[](#features)

- 🚀 **Multi-Framework** — Laravel, Yii2, API, and simple PHP deployment recipes
- ⚡ **Zero-Config Defaults** — Smart detection with easy customisation
- 🔒 **Production Safe** — Multiple confirmation prompts, validation, and rollback
- 🔑 **Laravel Env Encryption** — Automatic `LARAVEL_ENV_ENCRYPTION_KEY` decryption before deploy
- 🗺️ **Asset Mapping** — Maps Vite/Mix assets for database URL compatibility
- 🖼️ **Image Optimisation** — Compress images post-deploy
- 🗂️ **Sitemap Generation** — Automatic sitemap creation and verification
- 🔤 **Font Verification** — Checks webfonts are accessible after deploy
- 🕒 **Deployment Timing** — Built-in timer and metrics
- 🎛️ **Interactive or Unattended** — Prompted workflow or fully automated via `auto_*` flags

---

Requirements
------------

[](#requirements)

- PHP **8.1+**
- [Deployer](https://deployer.org) **7.x** (installed automatically as a dependency)
- Git
- SSH access to your deployment server

---

Installation
------------

[](#installation)

Install via [Composer](https://getcomposer.org):

```
composer require klytron/php-deployment-kit --dev
```

Verify the installation:

```
vendor/bin/dep --version
```

### Optional: Scaffold a deploy.php automatically

[](#optional-scaffold-a-deployphp-automatically)

```
# Auto-detect your project type (Laravel / Yii2 / simple PHP) and create deploy.php
curl -sSL https://raw.githubusercontent.com/klytron/php-deployment-kit/main/install.sh | bash
```

---

Quick Start
-----------

[](#quick-start)

### 1. Create `deploy.php` in your project root

[](#1-create-deployphp-in-your-project-root)

```
