Knowledgebase

A Simple Deployment Workflow Print

  • developersgitdeployment, developers, migration, caching, troubleshooting, guide, howto, solution
  • 0

Getting code from your machine to the server reliably.

THE BASIC FLOW

  1. Develop locally.
  2. Commit and push to your remote repository.
  3. On the server, pull the changes.
  4. Run any post-deployment steps: dependency install, migrations, cache clear.
  5. Verify the site works.

WHY NOT EDIT ON THE SERVER

Changes made directly on the server exist nowhere else, are lost at the next deployment, and cause regressions nobody can explain.

If you must fix something urgently on the server, commit the same change to the repository immediately afterwards.

SCRIPTING IT

Write a short script performing the pull and the post-deployment steps. Run one command rather than remembering five.

Keep the script in the repository.

WHAT TO AUTOMATE LATER

Triggering deployment from a push, using a webhook or a pipeline. Worth it once manual deployment becomes the bottleneck, not before.

CONFIGURATION

Keep environment-specific configuration out of the repository. The server holds its own .env or config file, excluded from Git.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot