PHPackages                             gaambo/deployer-wordpress - 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. gaambo/deployer-wordpress

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

gaambo/deployer-wordpress
=========================

Deployer tasks for deploying WordPress Sites

v4.0.1(2w ago)487636[5 issues](https://github.com/gaambo/deployer-wordpress/issues)MITPHPPHP ^8.1CI passing

Since Jun 3Pushed 2d ago1 watchersCompare

[ Source](https://github.com/gaambo/deployer-wordpress)[ Packagist](https://packagist.org/packages/gaambo/deployer-wordpress)[ Docs](https://github.com/gaambo/deployer-wordpress)[ RSS](/packages/gaambo-deployer-wordpress/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)Dependencies (7)Versions (19)Used By (0)

Deployer WordPress Recipes
==========================

[](#deployer-wordpress-recipes)

[Deployer](https://deployer.org) tasks and recipes for deploying WordPress sites. Supports simple rsync deployments, custom theme/plugin builds, and complex setups including Bedrock and multisite.

Table Of Contents
-----------------

[](#table-of-contents)

- [Deployer WordPress Recipes](#deployer-wordpress-recipes)
    - [Table Of Contents](#table-of-contents)
    - [Installation](#installation)
    - [Requirements](#requirements)
    - [Configuration](#configuration)
        - [Default Directory Structure](#default-directory-structure)
        - [Localhost context](#localhost-context)
        - [wp-config.php](#wp-configphp)
        - [Rsync filters/excludes/includes](#rsync-filtersexcludesincludes)
    - [Tasks](#tasks)
        - [Database Tasks (`tasks/database.php`)](#database-tasks-tasksdatabasephp)
            - [Multisite support](#multisite-support)
        - [Packages system (`tasks/packages.php`)](#packages-system-taskspackagesphp)
        - [File Tasks (`tasks/files.php`)](#file-tasks-tasksfilesphp)
        - [WordPress Tasks (`tasks/wp.php`)](#wordpress-tasks-taskswpphp)
        - [Language Tasks (`tasks/languages.php`)](#language-tasks-taskslanguagesphp)
        - [Uploads Tasks (`tasks/uploads.php`)](#uploads-tasks-tasksuploadsphp)
        - [Legacy Tasks (Themes, Plugins, MU-Plugins)](#legacy-tasks-themes-plugins-mu-plugins)
        - [WP-CLI](#wp-cli)
        - [Recipes](#recipes)
            - [Simple](#simple)
            - [Bedrock](#bedrock)
    - [Changelog](#changelog)
    - [Contributing](#contributing)
        - [Testing](#testing)
    - [Built by](#built-by)

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

[](#installation)

1. `composer require gaambo/deployer-wordpress --dev`
2. Copy example files from `examples/simple/` or `examples/bedrock/` to your project root
3. Customize `deploy.php` and `deploy.yml`:

- Set `current_path` for all hosts (remote + localhost)
- Configure custom code as [packages](#packages-system-taskspackagesphp)
- Adjust deployment flow if needed

4. Test on staging first, then deploy to production 🚀

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

[](#requirements)

- PHP + [Composer](https://getcomposer.org)
- [Deployer](https://deployer.org) (automatically installed)
- WordPress installation
- \*nix OS (Linux/macOS or [WSL](https://docs.microsoft.com/en-us/windows/wsl/install-win10) on Windows)
- `rsync` installed

Optional (auto-installed on remote if missing):

- [WP-CLI](https://wp-cli.org/) for database tasks
- [Composer](https://getcomposer.org) for package vendors (depending on your custom theme/plugins)
- [Node.js/npm](https://nodejs.org/) for building assets (depending on your custom theme/plugins)

Configuration
-------------

[](#configuration)

Example recipes (in `examples/`) provide configuration starting points. The library works with any WordPress setup ( vanilla, Composer, subdirectory, Bedrock, multisite) by making all paths and directories configurable. Check the example recipes and task source files for available options.

### Localhost context

[](#localhost-context)

Version 4 introduces a proper `Localhost` context. This ensures that when tasks run on your local machine (like building assets or backing up the local database), they use configuration values specifically defined for localhost, rather than falling back to global or remote values.

Configure localhost in `deploy.php`:

```
localhost()
    ->set('public_url', 'http://wp-boilerplate.test')
    ->set('current_path', 'public') // WordPress root
    ->set('dbdump_path', __DIR__ . '/data/db_dumps')
    ->set('backup_path', __DIR__ . '/data/backups');
```

The `Localhost` utility class (`Gaambo\DeployerWordpress\Localhost`) handles switching context automatically in tasks.

### wp-config.php (Recommendation)

[](#wp-configphp-recommendation)

Keep `wp-config.php` in git and deploy it. Extract environment-specific config (database credentials, `WP_DEBUG`) into `wp-config-local.php`, which should be gitignored and created manually on each host. Require it from `wp-config.php`:

```
if (file_exists(__DIR__ . '/wp-config-local.php')) {
    require_once __DIR__ . '/wp-config-local.php';
}
```

### Rsync filters

[](#rsync-filters)

The default rsync config uses `.deployfilter` files for per-directory filtering. Place a `.deployfilter` file in your theme/plugin to exclude development files:

```
- phpcs.xml
- README.md
- .babelrc
- node_modules
- .eslintignore
- .eslintrc.json
- .stylelintignore
- .stylelintrc.json
- gulp.config.js
- gulpfile.babel.js
- package.json
- package-lock.json
- .babelrc
- phpcs.xml

```

This prevents any development files/development tools from syncing. I strongly recommend you put something like this in your custom theme and mu-plugins or overwrite any of the `themes/filter` or `mu-plugins/filter` configurations.

Tasks
-----

[](#tasks)

Tasks are in the `tasks/` directory. Run `dep list` to see all available tasks. See task source files for configuration options.

### Database Tasks (`tasks/database.php`)

[](#database-tasks-tasksdatabasephp)

- `db:remote:backup`: Backup remote database and download to localhost
- `db:local:backup`: Backup local database and upload to remote host
- `db:remote:import`: Import current database backup (from localhost) on remote host
- `db:local:import`: Import current database backup (from remote host) on local host
- `db:push`: Pushes local database to remote host (combines `db:local:backup` and `db:remote:import`)
- `db:pull`: Pulls remote database to localhost (combines `db:remote:backup` and `db:local:import`)

#### Multisite support

[](#multisite-support)

For multisite installations, set `wp/multisite` to `true` to enable network-wide search-replace during database sync:

```
set('wp/multisite', true);
```

### Packages system (`tasks/packages.php`)

[](#packages-system-taskspackagesphp)

Manage custom themes, plugins, and mu-plugins with individual build configs:

```
set('packages', [
    'custom-theme' => [
        'path' => '{{themes/dir}}/custom-theme',
        'remote:path' => '{{themes/dir}}/custom-theme', // optional
        'assets' => true,
        'assets:build_script' => 'build',
        'vendors' => true,              // Run composer install
    ],
    // Add more packages as needed
]);
```

**Tasks:**

- `packages:assets:vendors` - Install npm dependencies
- `packages:assets:build` - Run build scripts
- `packages:vendors` - Install composer dependencies
- `packages:push` / `packages:pull` - Sync packages

### Other Task Categories

[](#other-task-categories)

**File Tasks** (`tasks/files.php`)

- `files:push` / `files:pull` - Sync all files (combines wp, uploads, plugins, themes, packages)

**WordPress Core** (`tasks/wp.php`)

- `wp:download-core`, `wp:push`, `wp:pull`, `wp:info`

**Languages** (`tasks/languages.php`)

- `languages:push`, `languages:pull`, `languages:sync`, `languages:backup:*`

**Uploads** (`tasks/uploads.php`)

- `uploads:push`, `uploads:pull`, `uploads:sync`, `uploads:backup:*`

**Legacy Tasks** (use [packages](#packages-system-taskspackagesphp) instead)

- Themes: `themes:push`, `themes:pull`
- Plugins: `plugins:push`, `plugins:pull`
- MU-Plugins: `mu-plugins:push`, `mu-plugins:pull`

Recipes
-------

[](#recipes)

v4 uses `current_path` for rsync-based deployments. Symlinked releases are still possible but not the default.

**`recipes/simple.php`** - Standard WordPress. Rsyncs directly to `current_path`. Recommended for most projects.

**`recipes/bedrock.php`** - [Roots Bedrock](https://roots.io/bedrock/) projects with appropriate structure and environment handling.

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md).

Contributing
------------

[](#contributing)

Issues, feature requests, and pull requests welcome at [GitHub](https://github.com/gaambo/deployer-wordpress). Code follows PSR-2 and Deployer best practices.

### Testing

[](#testing)

The library includes a comprehensive test suite with unit, integration, and functional tests.

- Run `composer phpunit` to execute all tests.
- Functional tests use a mocked environment to verify rsync commands and file operations without real remote connections.

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance96

Actively maintained with recent releases

Popularity27

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 93.2% 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 ~180 days

Recently: every ~264 days

Total

15

Last Release

20d ago

Major Versions

1.4.1 → 2.0.02023-03-20

2.0.0 → 3.0.0-alpha2023-05-23

3.1.0 → v4.x-dev2026-03-20

PHP version history (3 changes)1.0.1PHP ^7.0

2.0.0PHP ^8.0|^7.3

v4.x-devPHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/4f340f0ed9ec2b1c91b31913575bcb9f7c545085bff4b06dd1b0611a5e8598ac?d=identicon)[fabiantodt](/maintainers/fabiantodt)

---

Top Contributors

[![gaambo](https://avatars.githubusercontent.com/u/5585580?v=4)](https://github.com/gaambo "gaambo (69 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![rslanzi](https://avatars.githubusercontent.com/u/7341598?v=4)](https://github.com/rslanzi "rslanzi (2 commits)")[![quintenbuis](https://avatars.githubusercontent.com/u/36452184?v=4)](https://github.com/quintenbuis "quintenbuis (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/gaambo-deployer-wordpress/health.svg)

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

###  Alternatives

[sourcebroker/deployer-extended

Library with some additional tasks for deployer (deployer.org).

25275.4k9](/packages/sourcebroker-deployer-extended)[ngmy/webloyer

Webloyer is a Web UI for managing Deployer deployments

2181.1k](/packages/ngmy-webloyer)[florianmoser/bedrock-deployer

Deployer recipes for Roots Bedrock

5414.4k1](/packages/florianmoser-bedrock-deployer)[n98/n98-deployer

netz98 deployer tasks, recipes, configuration

2543.6k1](/packages/n98-n98-deployer)[setono/deployer-cron

Use the Setono cron builder to generate cron files in your deployment process

1224.0k](/packages/setono-deployer-cron)

PHPackages © 2026

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