Context
If your website lives in a GitHub or GitLab repository, there is no need to upload your files over FTP after every change. Your Winheberg web hosting can fetch the repository itself and deploy its content into your website folder, on demand or automatically on every git push.
Plesk handles this with a built-in Git tool. It clones the repository, keeps track of the latest commits and copies the files of the chosen branch to the folder of your choice.
This guide covers adding a public or private repository, choosing the deployment folder, automatic deployment by webhook, manual deployment and common errors.
The Winheberg Plesk panel is displayed in French. Menu, field and button names are quoted below exactly as they appear on screen, followed by their English meaning.
Prerequisites
- A Winheberg web hosting plan with access to the Plesk panel
- A GitHub or GitLab repository that holds the files of your website, organised the way they must be on the hosting
- For a private repository, the right to edit the repository settings, to add a deploy key
Git deploys files. The database and the configuration files that hold your passwords, such as .env or wp-config.php, must be prepared on the hosting and must not be in the repository.
1. Open the Git tool
Open your domain from Sites Web & Domaines (Websites & Domains), then the Tableau de bord (Dashboard) tab. In the Outils Dévelop. (Dev Tools) section, click Git, then Ajouter un dépôt (Add Repository).
2. Enter the repository
In Emplacement du code (Code location), keep Dépôt distant (Remote repository), then paste the address of your repository into URL du dépôt (Repository URL). Plesk then suggests a Nom du dépôt (Repository name), which you can keep.
| Repository type | Address to paste | Access |
|---|---|---|
| Public | https://github.com/account/project.git |
No setting |
| Private, by SSH key | git@github.com:account/project.git |
Deploy key to add on GitHub or GitLab |
| Private, by HTTPS | https://gitlab.com/account/project.git |
Nom d'utilisateur (Username) and access token in Mot de passe (Password) |
Allow Plesk on a private repository
The safest method is the deploy key, which gives Plesk read-only access to this single repository. Paste the SSH address of the repository, Plesk then shows the Contenu de la clé publique SSH (Public SSH key content) field. Copy the whole key.
- On GitHub, open your repository, then Settings, Deploy keys and Add deploy key. Paste the key and leave Allow write access unticked
- On GitLab, open your project, then Settings, Repository and Deploy keys. Paste the key and leave write access unticked
3. Choose the mode and the deployment folder
In Paramètres de déploiement (Deployment settings), choose the Mode de déploiement (Deployment mode).
| Mode | Effect |
|---|---|
| Automatique (Automatic) | Files are deployed as soon as new commits reach Plesk |
| Manuel (Manual) | Files are only deployed when you click Déployer maintenant (Deploy now) |
| Désactivé (Disabled) | Plesk keeps the repository without copying anything to the website |
Chemin serveur (Server path) is the folder that receives the files. It defaults to /httpdocs, the folder of your main website.
Deployment overwrites the files of the target folder that have the same name as those of the repository. For a first try, deploy to an empty folder or to a test subdomain, and back up your website before targeting /httpdocs, with our guide How to Back Up and Restore Your Website on Plesk
Click Créer (Create). Plesk clones the repository and, in Automatique mode, deploys the main branch right away. The repository card then shows the branch, the latest commits and the action buttons.
4. Deploy automatically on every push
For Plesk to fetch your commits as soon as you push, the service that hosts the repository must notify it, through a webhook.
On the repository card, click Paramètres du dépôt (Repository settings) and copy the URL webhook (Webhook URL). The Branche du répertoire (Repository branch) field shows the deployed branch, change it if your live website follows another branch than the main one.
- On GitHub, open Settings, then Webhooks and Add webhook. Paste the address into Payload URL, keep Just the push event and confirm with Add webhook
- On GitLab, open Settings, then Webhooks and Add new webhook. Paste the address into URL, tick Push events and save
Make a test commit and push it. A few seconds later, it shows up under Derniers commits (Latest commits) on the repository card in Plesk.
5. Deploy by hand
Without a webhook, or in Manuel mode, two buttons on the repository card are enough.
- Exécuter pull (Pull updates) fetches the latest commits from GitHub or GitLab
- Déployer maintenant (Deploy now) copies the fetched version to the Chemin serveur
6. Run commands after each deployment
In Paramètres du dépôt, the Activer des actions de déploiement supplémentaires (Enable additional deployment actions) box opens an Actions de déploiement (Deployment actions) field. Enter one command per line, Plesk runs them in the deployment folder after each deployment.
mkdir -p cache
rm -rf cache/*
These commands run in a restricted environment, without PHP, Composer or Node.js. Keep them for simple file operations. For PHP dependencies, use the PHP Composer tool of the Tableau de bord, or commit the vendor folder built on your computer.
Troubleshooting
❌ Plesk cannot fetch the repository
Access to the repository is denied or the address is wrong.
- Check the address by opening it in your browser for a public repository
- For a private repository over SSH, check that the key shown by Plesk is listed in the Deploy keys of the repository
- For a private repository over HTTPS, use an access token and not your account password, GitHub and GitLab reject the latter
❌ The website does not change after a push
The webhook did not notify Plesk, or the deployment did not follow.
- On GitHub, open Settings, then Webhooks and Recent Deliveries to read the answer from Plesk
- Check that you push to the branch set in Branche du répertoire
- In Manuel mode, click Déployer maintenant
- Meanwhile, click Exécuter pull then Déployer maintenant to update the website
❌ The website shows an error after the deployment
The files are in place, but what does not go through Git is missing.
- Check that the configuration file exists on the hosting, for instance
.envorwp-config.php - Check that the dependencies, such as the
vendorfolder, are there - Check that the Chemin serveur matches the website root, or its
publicsubfolder for Laravel - Read the exact message in the logs, with our guide How to Read the Error Logs of Your Website on Plesk
Best practices
- Never commit your passwords, add
.envand the configuration files to your.gitignore - Prefer a read-only deploy key to your password or to a token that opens all your repositories
- Deploy to a test subdomain first, then to the live website
- Keep a branch for the live website, for instance
main, and work on other branches
Need help?
If Plesk cannot fetch your repository or if the deployment fails, open a ticket with our support from your client area, Technical department, filling in the Related Product field with the web hosting concerned. Give the repository address, without token or password, and the error message shown.
One git push, and your website is up to date 🚀


