Deploying WordPress with ease: v4 of my Deployer Recipes is here

I’ve done web development for long enough, that I remember cowboy coding on production servers via FTP, directly “deploying” from Notepad++ via FTP, manually uploading files and all that. That was fun and all, but also very brittle, error-prone and time-intense.

About six years ago, I started a collection of recipes for Deployer to automate how I push WordPress sites to production. Since I’m working alone on most projects, I don’t need an automated deployment solution based on GitHub Actions, I’d rather be in control and manually trigger deployments when they are ready.

What started as a small personal helper turned into a larger package: gaambo/deployer-wordpress. After almost a year of work and refining my own workflow, I finally released v4.0.0 this week. 🎉

Why use this?

While Deployer has a built-in WordPress recipe, it’s quite basic. My package goes further. It’s designed for real-world projects where you have:

  • Custom themes that need npm/composer builds.
  • Database syncs between local and production to keep your local dev environment up-to-date.
  • Advanced folder structures (like moving the core into a subfolder).
  • Shared uploads and configuration management.

What’s new in v4?

This version was a big cleanup and a step towards modern PHP and Deployer standards.

  • New package system: Instead of separate tasks for custom themes, plugins and mu-plugins (which also only supported one of each), there’s a new “package” system that allows you to define all custom code packages your project consists of, build and push them.
  • Better Localhost support: Proper context handling for local operations with consistent path resolution.
  • Multisite support for database pulls.
  • Code quality: Added code-quality tools (PHPStan, PHPCS) and automated tests + GitHub Actions.
  • Complete Refactoring: I moved from a big mess of functions to a cleaner, class-based utility structure. It’s much easier to maintain now.
  • Support for Deployer v7: The core logic is now fully compatible with the latest Deployer features. Deployer v8 is not yet released – see this tracking issue.

See the complete release notes.

How it works

If you’ve used Deployer before, getting started is easy. You just require the package via composer and include the recipe in your deploy.php:

require 'contrib/wordpress.php';
require 'vendor/gaambo/deployer-wordpress/autoload.php';

// That's it - you now have all WP-specific tasks available

The repository also contains base recipes for “vanilla” and bedrock based sites as well as example deploy.php files.

Acknowledgments

This is a tool that helps me (and hopefully others) get work done faster and more reliably. I use it on all projects that I maintain multiple times a week.

If you are a WordPress developer and want to stop using FTP or “git pull” on your servers, give it a try. You can find everything on GitHub:

GitHub Overview for the deployer-wordpress repository. It's Deployer tasks for deploying WordPress Sites

Explore the repository on GitHub

I’m always happy about feedback or pull requests. If you find a bug or have a suggestion, just open an issue!