PHPackages                             erdmenchen/laravel-bitbucket-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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. erdmenchen/laravel-bitbucket-deploy

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

erdmenchen/laravel-bitbucket-deploy
===================================

Deploy your Laravel app via Bitbucket pipelines and envoyer

0.4-beta.1(2y ago)117145[6 PRs](https://github.com/erdmenchen/laravel-bitbucket-deploy/pulls)GPL-3.0-or-laterBladePHP ^8.2

Since Dec 4Pushed 1y ago1 watchersCompare

[ Source](https://github.com/erdmenchen/laravel-bitbucket-deploy)[ Packagist](https://packagist.org/packages/erdmenchen/laravel-bitbucket-deploy)[ RSS](/packages/erdmenchen-laravel-bitbucket-deploy/feed)WikiDiscussions master Synced yesterday

READMEChangelog (8)Dependencies (3)Versions (16)Used By (0)

laravel-bitbucket-deploy
========================

[](#laravel-bitbucket-deploy)

Deploy your laravel app via bitbucket pipelines and envoyer.

 [![](https://camo.githubusercontent.com/0d2c5f916e8a3e5271ee21c802c5f2c6c6e10e0eee910c535023f5372da7c1fd/68747470733a2f2f706f7365722e707567782e6f72672f6572646d656e6368656e2f6c61726176656c2d6269746275636b65742d6465706c6f792f646f776e6c6f616473)](https://packagist.org/packages/erdmenchen/laravel-bitbucket-deploy) [![](https://camo.githubusercontent.com/c67c450245b17c7940d3be7ca990400d80b75c799a0cbc9222ac064456677aee/68747470733a2f2f706f7365722e707567782e6f72672f6572646d656e6368656e2f6c61726176656c2d6269746275636b65742d6465706c6f792f76657273696f6e)](https://packagist.org/packages/erdmenchen/laravel-bitbucket-deploy) [![](https://camo.githubusercontent.com/8f17e71bb447df72c5ade1bb063ab06afa5881b44a5795c1d39a496b1e7d9d94/68747470733a2f2f706f7365722e707567782e6f72672f6572646d656e6368656e2f6c61726176656c2d6269746275636b65742d6465706c6f792f762f756e737461626c65)](https://packagist.org/packages/erdmenchen/laravel-bitbucket-deploy) [![](https://camo.githubusercontent.com/6e42968b2cf9752754caa49da4bf11643c5645f1ec53558457997f2723142e2b/68747470733a2f2f706f7365722e707567782e6f72672f6572646d656e6368656e2f6c61726176656c2d6269746275636b65742d6465706c6f792f6c6963656e7365)](https://packagist.org/packages/erdmenchen/laravel-bitbucket-deploy)

> **Important:**
> Be sure, that your project (migrations!) is working as expected (tests!), because there is no backup mechanism during the deployment!
> Do not deploy to production only, always test releases on staging before!

Prerequisites
-------------

[](#prerequisites)

- Bitbucket account
- Bitbucket Pipeline build minutes available ([the free plan](https://confluence.atlassian.com/bitbucket/plans-and-billing-224395568.html#BitbucketCloudplandetails-Plandetails) has 50min per month)
- Hosting with SSH access

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

[](#installation)

You can easily install this package using Composer by running the following command:

```
composer require erdmenchen/laravel-bitbucket-deploy
```

After installation completed run the following command in order to install all required assets:

```
php artisan vendor:publish
```

Bitbucket Configuration
-----------------------

[](#bitbucket-configuration)

In order to get the build and deployment pipeline going at Bitbucket, you need to make the following steps in your Bitbucket repository:

1. Enable Pipelines
2. Add the repository variables: `DEPLOY_HOST` and `DEPLOY_USER`
3. Create a new SSH key, add your host to the known hosts and copy the public key to your hosting
4. Create the following deployment environments and set the variable `DEPLOY_PATH` for each:
    - Staging
    - Production

Hosting Configuration
---------------------

[](#hosting-configuration)

The deployment script requires the following folder structure on the web hosting in order to work:

- Deployment Target Folder (e.g. `cool_website_staging`)
    - .env (Laravel environment config file)
    - releases (each deployment will be placed here by the script in unique folders)
    - storage (Laravel storage folder)
        - framework/sessions
        - framework/views
        - framework/cache

During each deployment, the `.env` file and the `storage` folder are referenced into the current build folder via symlinks. Additionally a symlink `current` will be created (or updated) in the deployment folder, which points to the latest build folder.

To always point the webserver to the latest release, just create a symlink, that points on the `current` symlink (e.g. `cool_website.com` -&gt; `cool_website_staging/current/public`. You don´t need to edit it during deployment. It will always point to the latest release.

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

[](#requirements)

This package has the following requirements:

- PHP 7.3 or higher
- Laravel 6.0 or higher

How it works
------------

[](#how-it-works)

This package scaffolds a [Bitbucket pipeline](https://bitbucket.org/product/de/features/pipelines) script and a [Laravel Envoyer](https://laravel.com/docs/master/envoy) script into your Laravel project.

When a new pipeline run is triggered (via git commit or manually) a full CI/CD (Continuous Integration/Continuous Delivery) build is executed with the following steps:

1. Fetch source code and install PHP dependencies (`Build PHP`)
2. Run `phpunit` and gather results - stops on any failed test (`Test PHP`)
3. Install javascript dependencies via npm and build UI assets(`Build Assets`)
4. Deploy to staging / production - connects to hosting via ssh and pushes build (`Deploy`)
    - Create manifest file with original trigger commit details
    - Create symlinks to `.env` and `storage`
    - Check Laravel health (running `php artisan --version`)
    - Activate build by updating the `current` symlink
    - Optimise, migrate and cleanup Laravel project

The last step (step 4) is only executed when triggered from a commit on `develop` or `master` branch. Feature branches are build only, they do not get deployed.

License
-------

[](#license)

The GNU General Public License v3.0. Please see [License File](LICENSE) for more information.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 64.3% 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 ~211 days

Recently: every ~0 days

Total

8

Last Release

873d ago

PHP version history (3 changes)0.1-beta.1PHP ^7.3

0.1-beta.4PHP ^8.0

0.4-beta.1PHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6791096?v=4)[Erdmännchen](/maintainers/erdmenchen)[@erdmenchen](https://github.com/erdmenchen)

---

Top Contributors

[![erdmenchen](https://avatars.githubusercontent.com/u/6791096?v=4)](https://github.com/erdmenchen "erdmenchen (9 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")

---

Tags

bitbucket-pipelinesdeploymentlaravellaravel-packagephp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/erdmenchen-laravel-bitbucket-deploy/health.svg)

```
[![Health](https://phpackages.com/badges/erdmenchen-laravel-bitbucket-deploy/health.svg)](https://phpackages.com/packages/erdmenchen-laravel-bitbucket-deploy)
```

###  Alternatives

[timokoerber/laravel-one-time-operations

Run operations once after deployment - just like you do it with migrations!

6481.7M11](/packages/timokoerber-laravel-one-time-operations)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[sammyjo20/lasso

Lasso - Asset wrangling for Laravel made simple.

355347.9k](/packages/sammyjo20-lasso)[stechstudio/laravel-env-security

Securely manage .env files for different deployment environments

77116.4k1](/packages/stechstudio-laravel-env-security)[aaronfrancis/airdrop

A Laravel package to deploy your application faster by skipping asset compilation when possible.

19594.9k](/packages/aaronfrancis-airdrop)[richdynamix/arc

Production ready docker based development environment for your Laravel project.

1163.1k](/packages/richdynamix-arc)

PHPackages © 2026

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