Skip to content

Knowledgebase

Deploying with a release directory and a controlled switch

development

A release-directory workflow prepares new files separately before making them active. This reduces the time the public application spends with a mixture of old and new files.

Check access and requirements

Confirm the platform supports changing the active path, symlink or equivalent deployment reference. Identify persistent uploads, secrets, caches and database changes that must be managed separately.

01 Deploy with a release directory and a controlled switch

  1. Create a new release directory identified by a commit or build. Upload and verify the complete artifact without replacing the active directory in place.

  2. Attach the approved runtime configuration and persistent data paths. Build release-specific caches and run safe readiness checks.

  3. Apply database changes in a compatible, reviewed sequence. A file switch alone does not make an incompatible schema change reversible.

  4. Switch the active path using the supported operation, then restart or reload processes so they execute the intended release.

  5. Verify customer workflows and retain the previous release for the recovery window. Clean up only releases and generated data confirmed no longer needed.

02 Example: separate release files from persistent data

A release layout can use the following roles. These illustrative paths describe a design to adapt to your platform, not a shell script to run.

Path role Example Purpose
Previous code releases/release-17/ Retained reviewed artifact for the recovery window.
Candidate code releases/release-18/ Prepared and checked before activation.
Persistent uploads shared/uploads/ Current user files that must survive code switches.
Active reference current The platform-supported pointer or configured path used by web and worker processes.

Runtime secrets stay in protected configuration. After switching, confirm both web requests and background workers report the intended release and can read a recent upload. Database compatibility remains a separate deployment requirement.

Confirm the expected result

Check the release identifier through a safe endpoint or private diagnostic. Confirm both web processes and workers use the new path and that recent uploads remain present.

Resolve setup problems

If the platform cannot switch paths atomically, plan an appropriate maintenance or staged deployment procedure. Do not assume a sequence of FTP overwrites has the same behavior.

A common question

Does a symlink switch guarantee zero downtime?

The result depends on process reloads, database compatibility, connection handling and platform behavior. Test the full release path and describe its observed interruption honestly.

Was this answer helpful?

Need a little more help?

Our support team can help you find the next step.

Contact support

Powered by WHMCompleteSolution