How to deploy a site from Git and publish a staging copy
Deploy from an HTTPS repository with a token, create staging.<domain>, test, and publish the files to production without touching the database.
Deploy from Git
- Open Websites, Git and pick the site.
- Enter the repository's HTTPS URL and the branch. SSH and
git://URLs are not accepted. - For a private repository, add an access token; it is stored encrypted.
- Deploy. The panel clones into a work directory outside the web root and publishes to the site's document root without the
.gitdirectory. Submodules are not followed.
Use staging
- Create the staging site. It is an ordinary site named
staging.<domain>, markednoindexin all three web servers. - Point the staging copy of your application at another database. Creating staging does not clone the database, so until you do this staging writes to production's.
- Test your change on
staging.<domain>. - Publish: the files of staging are copied onto the live site, deleting live files that no longer exist in staging.
Warning: publishing copies files only. It never touches the database, so migrations and content must be handled separately.
Troubleshooting
- The repository does not show up: check the URL is HTTPS, the branch exists, the token has read access and the site's document root is right.
Last updated: 2026-10-10