Setting up Plesk Git
Wire up a GitHub repository to a Plesk subscription on Enlighten Cloud so every push
to main deploys the site automatically.
-
Install the Git extension in Plesk
In Plesk → Extensions, search for Git and install it if it's not already available. On Enlighten Cloud it is enabled by default for most hosting plans.
-
Open the subscription and add a repository
Go to the subscription for the domain you want to deploy, open the Git tab, and click Add Repository. Choose Remote Git hosting.
-
Point it at GitHub
Paste the HTTPS clone URL for this repository:
https://github.com/Enlighten-Cloud/plesk-git-demo.gitFor private repos, Plesk will show a deploy key — copy it into the repo's Settings → Deploy keys page on GitHub.
-
Pick the deployment mode
Select Automatic so Plesk pulls new commits as soon as GitHub sends a webhook. Set the Deployment path to the document root of the site (usually
httpdocs). -
Add the webhook to GitHub
Plesk displays a webhook URL. In GitHub, go to Settings → Webhooks → Add webhook, paste the URL, set the content type to
application/json, and leave the trigger on Just the push event. -
Optional: post-deploy commands
In the repository's Deployment actions panel, you can run shell commands after each pull. For a typical PHP project:
composer install --no-dev --optimize-autoloader php artisan migrate --force php artisan cache:clear -
Push a commit to test
Make any change,
git push, then reload the site. The deployment timestamp on the status page should update within a few seconds.