This is an archived copy of the SandyWP docs. It is kept online as a fallback and may be out of date. The maintained documentation lives at docs.sandywp.com.

Git deployment

Deploy a plugin, theme, or wp-content folder straight from a git repository into a sandbox manually with one click, or automatically on every push.

The Git Deployment panel on the sandbox detail page
The Git Deployment panel on the sandbox detail page.

Open Git deployment

Open a sandbox's Site settings, then choose Git Deployment in the side nav, and click Add repository.

Connect a repository

The Connect repository form for Git Deployment
The Connect repository form access type, URL, branch, and deploy path.
FieldWhat to enter
AccessPublic (clone over HTTPS) or Private (SSH) for repos that need a key.
Repository URLFor public, an HTTPS URL like https://github.com/owner/repo.git. For private, an SSH URL like [email protected]:owner/repo.git.
BranchThe branch to deploy (defaults to main).
DestinationPlugin, Theme, or wp-content folder.
Folder nameThe folder name to sync into, e.g. my-plugin.
Auto-deploy on pushDeploy automatically whenever you push (via webhook).

The destination plus folder name decide where files land in the sandbox:

  • Plugin → wp-content/plugins/your-folder
  • Theme → wp-content/themes/your-folder
  • wp-content folder → wp-content/your-folder
That folder is fully managed by git: files removed from the repo are removed from the sandbox on the next deploy, so the folder always mirrors the branch.

Private repositories

When you connect a private (SSH) repo, SandyWP generates a deploy key on connect. Add its public key as a read-only deploy key in your repository host (GitHub: Settings → Deploy keys; GitLab: Settings → Repository → Deploy keys). Without it, the clone will fail. You can copy the key again later from the repository card.

Auto-deploy on push

If you enable auto-deploy, SandyWP gives you a webhook URL after connecting. Add it to your git host as a webhook with a JSON content type and push events only. From then on, every push to the chosen branch triggers a deploy.

Deploy manually

Click Deploy now on the repository card to pull the latest commit and sync it. The card shows the last deployed commit, and a deployment history table records each deploy and its status. Deploys run on a ready sandbox.

Disconnect a repository

Click the disconnect (unplug) button on the repository card. The files already deployed stay on the sandbox, and the deploy history is kept only the connection is removed.

Next steps