Git Deployment
Git Deployment
Stop manually uploading files to your server. With Git deployment, every time you push code to your chosen branch, FlyWP automatically pulls the latest changes, runs your build steps, and updates your live site — no SSH (Secure Shell) access or manual file transfers needed. It’s the foundation of a professional, repeatable deployment workflow.
FlyWP integrates with GitHub so you can deploy changes automatically on every push. You can also trigger deployments manually, run custom build scripts, and review a full history of every deployment.
Connecting a Repository
Before connecting a repository, make sure you have connected your GitHub account in your Profile > Git Providers settings.
To connect your codebase to a site, follow these steps:
- Navigate to your site’s Deployment tab.
- Click Connect Repository.
- Select GitHub as your Git provider.
- Authorize FlyWP to access your repositories (if you have not already done so).
- Select the repository from the list.
- Choose the branch you want to deploy from (e.g.,
main,production).
Push-to-Deploy
Once your repository is connected, enable Push-to-Deploy to automatically trigger a deployment every time you push commits to the selected branch. Under the hood, FlyWP registers a webhook (an automated HTTP notification your Git provider sends when new code arrives) with your repository, so the process is instant. Here is what happens:
- You push code to your branch.
- Your Git provider sends a webhook notification to FlyWP.
- FlyWP pulls the latest code and runs your deployment scripts.
- Your site is updated with the new code.
Deployment Trigger URL
FlyWP generates a unique Deployment Trigger URL — a webhook URL (a special web address that accepts an HTTP POST request to kick off a deployment) — for each site. You can use this URL to trigger deployments from outside of Git pushes, such as:
- CI/CD pipelines (Continuous Integration/Continuous Deployment tools like GitHub Actions or GitLab CI that run automated tests and tasks)
- Custom scripts
- Any system that can make an HTTP POST request
Copy the URL from the Deployment tab and add it to your pipeline or webhook configuration.
Deployment Scripts
Define custom shell commands that FlyWP runs during each deployment, right after pulling your latest code. Common uses include:
- Installing Composer dependencies (
composer install --no-dev) — Composer is a PHP package manager - Running database migrations (
php artisan migrate --force) to update your database schema - Building frontend assets (
npm run build) to compile CSS and JavaScript - Clearing application caches so users see fresh content
FlyWP executes these scripts in the order you define them.
Manual Deployments
You do not always need a Git push to redeploy. Click the Deploy Now button to trigger a deployment on demand. This is useful when you:
- Want to redeploy the current branch without making new code changes
- Need to re-run deployment scripts after updating a configuration
- Are testing your deployment pipeline end-to-end
Deployment History
The deployment history table gives you a clear audit trail of everything that has run on your site:
| Column | Description |
|---|---|
| Status | Whether the deployment succeeded or failed |
| Commit | The Git commit hash (a unique ID for that snapshot of code) and message that triggered the deployment |
| Duration | How long the deployment took to complete |
| Date | When the deployment was triggered |
Click on any deployment row to view its full log output, which is the most effective way to diagnose a failed deployment.
If a deployment fails, your site continues running the previously deployed code. FlyWP does not take down your site mid-deployment. Check the deployment log to diagnose and fix the issue before deploying again.