Reproducible WordPress deploys with Composer and a separate build

If deploying the site depends on FTP and one person's memory, this simple path makes it reproducible.

Hamid Aarab Senior WordPress and WooCommerce Backend Developer
Published
Reading time
1 min read

Hamid Aarab September 15, 2026 1 min read

تصویر پیکسلی یک خط تولید که بسته‌ها را منتشر می‌کند
Contents (3)

A reproducible deploy means every release is built from a known commit in a clean environment, and rolling back takes seconds.

Dependencies in Composer

Manage public plugins and themes with Composer and a lock file, so every environment runs exactly the same code.

Build in a clean environment

npm ci && npm run build
composer install --no-dev --optimize-autoloader
zip -r release-$(git rev-parse --short HEAD).zip . -x 'node_modules/*' 'tests/*'

Release and roll back

  1. Unpack the new release into its own directory.
  2. Point the current symlink at it.
  3. Clear caches and run the smoke test.
  4. If anything breaks, point the symlink back at the previous release.

The database is not part of this cycle; back it up before every release and handle migrations separately.

$ ./request_review

Facing the same problem in your own store?

Senior WordPress and WooCommerce backend engineering for complex production problems.

Request a Technical Assessment

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *