Git in Plesk: Deploy a Site from a Repository

The Git extension deploys website files straight from a repository. Your code lives on GitHub, GitLab, or Bitbucket, and Plesk pulls the changes and copies them to the site folder.

Connect a repository

  1. Go to Websites & Domains → your domain → Dev Tools group → Git.
  2. Click Add Repository.
  3. Choose Remote repository, a repository on an external service. Plesk will pull changes from it.
  4. In Repository URL, enter the repository address. Both HTTP(S) and SSH are supported.
  5. Check the Repository name; it must be unique within the domain.
  6. Choose the Deployment mode and Deployment directory (\httpdocs by default).
  7. Click Create.
Creating a repository
Creating a repository

Deployment modes

ModeHow it works
Automaticfiles are deployed on every new commit to the selected branch
Manualfiles are deployed only when you click the deploy button in Plesk
Disabledthe repository is kept in Plesk, but nothing is copied to the site folder

To let Plesk know about new commits, the repository settings in Plesk show a webhook URL. Add it to the repository settings on GitHub or Bitbucket. For a private repository over SSH, add the SSH public key shown by Plesk to the repository access keys.

Local repository is for a repository on your own computer: you push changes to the Plesk repository yourself.

Deployment overwrites files in the selected folder. Do not edit those files by hand in File Manager or over FTP, or your changes will be lost on the next deployment. Keep passwords and database connection strings out of the repository.

Common mistakes

  • The wrong branch is selected, so files do not update.
  • \httpdocs is selected, but the site expects files in a subfolder. Check the document root in hosting settings.
Questions and answers
Check the deployment mode and branch. In Manual mode, click the deploy button; in Automatic mode, make sure the webhook is added to the repository.
No, Git only copies files. For ASP.NET Core, deploy an already built (published) version: ASP.NET Core.