PHPackages                             mmoollllee/bedrock-deployer - 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. [Database &amp; ORM](/categories/database)
4. /
5. mmoollllee/bedrock-deployer

Abandoned → [mmoollllee/bedrock-deployer-7](/?search=mmoollllee%2Fbedrock-deployer-7)Library[Database &amp; ORM](/categories/database)

mmoollllee/bedrock-deployer
===========================

Deployer recipes for Roots Bedrock

v1.0.6(2y ago)013MITPHP

Since Jun 29Pushed 3mo agoCompare

[ Source](https://github.com/mmoollllee/bedrock-deployer-7)[ Packagist](https://packagist.org/packages/mmoollllee/bedrock-deployer)[ RSS](/packages/mmoollllee-bedrock-deployer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (2)Versions (17)Used By (0)

bedrock-deployer-7
==================

[](#bedrock-deployer-7)

[Deployer 7](https://deployer.org/) recipes for [Roots Bedrock](https://roots.io/bedrock/), also supports [Roots Sage](https://roots.io/sage/) and [Roots Trellis](https://roots.io/trellis/) setups. Based on the work by [FlorianMoser](https://github.com/FlorianMoser/bedrock-deployer)

Trellis provides a powerful deployment with Ansible. But if you would like to deploy Bedrock only while running a custom process, Deployer is a quick and simple alternative.

Maybe you are even trying to deploy Bedrock to a shared hosting like Plesk. Depending on your hosting environment, this can be possible.

**A word of caution:** Make sure you have a backup of your local as well as your remote files, before experimenting with deployment recipes. Files might easily get overwritten when you provide wrong paths! You are solely responsible by using the recipes provided here.

Who needs this
--------------

[](#who-needs-this)

PHP developers who would like to deploy their Bedrock applications using Deployer v7.

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

[](#installation)

Use Composer:

```
$ composer require mmoollllee/bedrock-deployer-7

```

Setup your Trellis &amp; Bedrock environment and create a repository. The repository may contain a trellis and a site folder, or the bedrock project [example](https://github.com/mmoollllee/bedrock)

Create a deploy.php in your project root and configure your environments. You might want to use [examples/deploy.full-example.php](https://github.com/mmoollllee/bedrock-deployer-7/blob/master/examples/deploy.full-example.php) and have a look at its required [config file](%5Bexamples/deploy.full-example.php%5D(https://github.com/mmoollllee/bedrock-deployer-7/blob/master/config/config.php)). If so, first run will create a `.env.deployer` and ask for your project's details.

First run with `vendor/bin/dep -vvv deploy` &amp; select target environment.

Recipes
=======

[](#recipes)

This package offers several recipes to help you with your Bedrock deployment. Require each package as needed or use the example configuration file in [examples/deploy.full-example.php](https://github.com/mmoollllee/bedrock-deployer-7/blob/master/examples/deploy.full-example.php) and have a look at its required [config file](%5Bexamples/deploy.full-example.php%5D(https://github.com/mmoollllee/bedrock-deployer-7/blob/master/config/config.php)).

The available recipes:

Bedrock DB
----------

[](#bedrock-db)

Provides tasks to export the database from the server and import it to your development machine and vice versa.

### Trellis / VM / Vagrant environment

[](#trellis--vm--vagrant-environment)

Requirements:

- Virtual Machine (Vagrant, Lima,...) **running** on your local machine (or Trellis, of course)
- WP CLI running on your Virtual Machine as well as on your remote machine

Load into your deploy.php file with:

```
require 'vendor/mmoollllee/bedrock-deployer-7/recipe/bedrock_db.php';
```

Requires these Deployer environment variables to be set:

- local\_root: Absolute path to website root directory on local host machine
- trellis\_dir: Absolute path to directory that contains trellis
- vm\_root: Absolute path to website inside Virtual machine (should mirror local\_root)
- vm\_shell: Virtual Machine SSH Pattern (e.g. `vagrant ssh -- -t cd {{vm_root}}`)

Example:

```
set( 'local_root', dirname( __FILE__ ) );
set( 'trellis_dir', dirname( __FILE__ ) . '/../trellis' );
set( 'vm_root', '/srv/www/domain.com/current' );
set( 'vm_shell', 'trellis vm shell --workdir ' . get('vm_root') . ' --' );
```

### Valet+ environment

[](#valet-environment)

Requirements:

- Bedrock running on [Valet+](https://github.com/weprovide/valet-plus)

Load into your deploy.php file with:

```
require 'vendor/mmoollllee/bedrock-deployer-7/recipe/bedrock_valetplus_db.php';
```

Requires these Deployer environment variables to be set:

- local\_root: Absolute path to website root directory on local host machine

Example:

```
set( 'local_root', dirname( __FILE__ ) );
```

### Task pull:db

[](#task-pulldb)

Exports database on server and imports it into your local Vagrant database, while removing previous data. Creates a backup of the local database in the local\_root directory, before importing the new data.

After the import, the WordPress URLs are converted from server URL to local URL, so your WordPress installation will continue to work right after the import.

Database credentials and URLs are read from remote and local .env file. So make sure, those files are up to date.

### Task push:db

[](#task-pushdb)

Exports database from local Vagrant database and imports it into your remote server, while removing previous data. Creates a backup of the remote database on the server in the current release directory, before importing the new data.

After the import, the WordPress URLs are converted from local URL to remote URL, so your WordPress installation will continue to work right after the import.

Database credentials and URLs are read from remote and local .env file. So make sure, those files are up to date.

Bedrock .env
------------

[](#bedrock-env)

Provides tasks to manage the .env file on the server.

Load into your deploy.php file with:

```
require 'vendor/mmoollllee/bedrock-deployer-7/recipe/bedrock_env.php';
```

Requires no special Deployer environment variables to be set.

### Task bedrock:env

[](#task-bedrockenv)

Tries to copy the .env file from a previous release to current release. If there is no previous release or if no .env file is available, the .env file is created while prompting the user for credentials.

When creating a new .env file, this task also generates the WordPress salts.

Bedrock Miscellaneous
---------------------

[](#bedrock-miscellaneous)

Provides miscellaneous Bedrock tasks.

Load into your deploy.php file with:

```
require 'vendor/mmoollllee/bedrock-deployer-7/recipe/bedrock_misc.php';
```

Requires no special Deployer environment variables to be set.

### Task bedrock:vendors

[](#task-bedrockvendors)

Runs `composer install` for Bedrock on your server.

Common
------

[](#common)

Provides common deployment tasks.

Requirements:

- WP CLI running on your Vagrant as well as on your remote machine

Load into your deploy.php file with:

```
require 'vendor/mmoollllee/bedrock-deployer-7/recipe/common.php';
```

Requires no special Deployer environment variables to be set.

### Task activate:plugins

[](#task-activateplugins)

Activates all plugins on remote server.

Filetransfer
------------

[](#filetransfer)

Provides tasks to upload/download files from/to synced directories.

Load into your deploy.php file with:

```
require 'vendor/mmoollllee/bedrock-deployer-7/recipe/filetransfer.php';
```

Requires these Deployer environment variables to be set:

- sync\_dirs: Array of paths, that will be simultaneously updated with $absoluteLocalPath =&gt; $absoluteRemotePath. If a path has a trailing slash, only its content will be transferred, not the directory itself.

Example:

```
set( 'sync_dirs', [
    dirname( __FILE__ ) . '/web/app/uploads/' => '{{deploy_path}}/shared/web/app/uploads/',
] );
```

### Task pull:files

[](#task-pullfiles)

Will pull all files from each `$absoluteRemotePath` to each `$absoluteLocalPath`. New files will be added, existing files will be updated, but files existing locally only will not be deleted.

To ensure no files are lost, each `$absoluteLocalPath` and its content are backed up in a zip file that will be added in the `$absoluteLocalPath`. Existing backups from previous pulls are not included in a new backup.

If you prefer to pull the files without making a backup, consider using the task `pull:files-no-bak`.

### Task push:files

[](#task-pushfiles)

Will push all files from each `$absoluteLocalPath` to each `$absoluteRemotePath`. New files will be added, existing files will be updated, but files existing on remote server only will not be deleted.

To ensure no files are lost, each `$absoluteRemotePath` and its content are backed up in a zip file that will be added in the `$absoluteRemotePath`. Existing backups from previous pushes are not included in a new backup.

If you prefer to push the files without making a backup, consider using the task `push:files-no-bak`.

Sage
----

[](#sage)

Provides tasks to deploy Roots Sage theme.

Requirements:

- Roots Sage 10 (also supports Sage 9, see the included /examples/deploy.full-example.php on how to use with Sage 9)

Load into your deploy.php file with:

```
require 'vendor/mmoollllee/bedrock-deployer-7/recipe/sage.php';
```

Requires these Deployer environment variables to be set:

- theme\_path: Path to theme, relative to release\_path
- local\_root: Absolute path to website root directory on local host machine

Example:

```
set( 'local_root', dirname( __FILE__ ) );
set( 'theme_path', 'web/app/themes/theme-name' );
```

### Task sage:vendors

[](#task-sagevendors)

Runs `composer install` inside Sage theme directory.

### Task sage:assets

[](#task-sageassets)

Compiles the Sage assets on the local machine and then uploads them to remote server in theme directory (overwriting previous assets!).

Trellis
-------

[](#trellis)

You will not want to use these recipes to deploy Trellis. Trellis has its own and powerful deployment process. However you might use Trellis for developing and only use these recipes to deploy Bedrock.

You might have a site &amp; a trellis directory in your repository, or only the bedrock-style repository without site folder. This task deals with both situations:

### Task trellis:remove

[](#task-trellisremove)

Will check for a /site folder. If true it will delete the remote /trellis directory and move the content of /site to /. Use this task after deployment but before symlink changes.

Advanced Custom Fields Pro
--------------------------

[](#advanced-custom-fields-pro)

ACF PRO is a powerful Wordpress Plugin to build userfriendly custom fields and more. The Pro version via composer install needs a auth.json for authentification. [See official documentation on how to get it's content](https://www.advancedcustomfields.com/resources/installing-acf-pro-with-composer/).

### Task bedrock:acf

[](#task-bedrockacf)

Uploads your local auth.json to the release directory.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance54

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 69.1% 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 ~153 days

Recently: every ~4 days

Total

16

Last Release

942d ago

Major Versions

v0.3.6 → 1.0.02023-02-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/88283625eedcbfe3f417a3216d2591bb42edb53f361203bb7c46a1d043d70888?d=identicon)[mmoollllee](/maintainers/mmoollllee)

---

Top Contributors

[![mmoollllee](https://avatars.githubusercontent.com/u/26859300?v=4)](https://github.com/mmoollllee "mmoollllee (56 commits)")[![FlorianMoser](https://avatars.githubusercontent.com/u/8578668?v=4)](https://github.com/FlorianMoser "FlorianMoser (14 commits)")[![flomo303](https://avatars.githubusercontent.com/u/216729114?v=4)](https://github.com/flomo303 "flomo303 (9 commits)")[![themkvz](https://avatars.githubusercontent.com/u/24822556?v=4)](https://github.com/themkvz "themkvz (1 commits)")[![tobinski](https://avatars.githubusercontent.com/u/501804?v=4)](https://github.com/tobinski "tobinski (1 commits)")

---

Tags

bedrockcomposerdatabasedeployerdeployer-recipesplesktrellis

### Embed Badge

![Health badge](/badges/mmoollllee-bedrock-deployer/health.svg)

```
[![Health](https://phpackages.com/badges/mmoollllee-bedrock-deployer/health.svg)](https://phpackages.com/packages/mmoollllee-bedrock-deployer)
```

PHPackages © 2026

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