Deploy your site with git
Get a git remote for your website and put changes live with git push, over the site's own SSH.
Every website can have its own git repository on the server. You clone it, work on your own computer, and a git push updates the live site's files. It works over the website's SSH, so it is available on plans that include SSH.
Before you start
git reaches your site over SSH, with the same key you use for SFTP. Set both up first:
- In your control panel, select My sites, then the website.
- Open the Files tab.
- On the SFTP access card, paste your public key and select Save keys.
- On the SSH card, tick Allow SSH to this site and select Save.
See Upload and manage your website's files for the details.
Get the git remote
- Open the website's Studio tab.
- On the Git remote card, select Show the git remote.
- The card says Repository made the first time, or Repository ready after that, and names the branch.
- Copy the
git clonecommand it shows and run it on your computer.
Good to know: if SSH is off for the site, the button is greyed out and the card says why.
Put changes live
Work in your copy, commit, and push:
git add .
git commit -m "Describe the change"
git push
A push updates the live site's files directly. There is no separate publish step.
If somebody has edited files on the server since your last push, for example in the file manager or over SFTP, the push is refused rather than overwriting their work. To carry on, sign in over SSH, commit those changes in the site's public_html folder, pull them into your copy, and push again.
What is in the repository
The repository is the site's public_html folder, the part visitors see. wp-config.php and wp-content/uploads are deliberately left out, so your database password and your visitors' uploads stay on the server and do not travel with every clone. The card lists everything it leaves out under Not tracked.
git and your coding agent
The Studio tab also connects your own coding agent. The two are different routes:
- A coding agent writes to the site's staging copy, and a person publishes it.
- A git push goes straight to the live site.
Before a big change
Select Create backup on the site's Backups tab first. If a push goes wrong, you can bring back the files as they were.
Related
More in Websites
- Install WordPress or another application in one click
Put WordPress, Joomla, Ghost, Wiki.js, NodeBB or Flarum on your website, with its database and first admin account made for you.
- Upload and manage your website's files
Upload, edit and download your site's files in the file manager, or connect with SFTP, FTP over TLS or SSH.
- Restore a backup, a single file, or something you deleted
Turn on backups for a website, take one before a risky change, and bring back the whole site, one file, a database or a deleted site.
- Change your site's PHP version and settings
Choose the PHP version each website runs, and raise limits such as upload size and memory for one site.

