Plesk can receive website changes pushed from a Git repository on your computer and deploy them to a website directory. This guide explains how to set up the receiving repository in Plesk for that workflow.

Before you start

Your subscription must include the Git extension. Use the encrypted connection offered by Plesk: SSH where supported and permitted, or HTTPS with a valid certificate. You also need Git on your computer and a local repository containing the files you intend to publish.

Back up the destination website before deploying. Do not include passwords, private keys or other secrets in files that will be published.

Create the repository in Plesk

  1. Log in to Plesk and open the domain under Websites & Domains.
  2. Open Git. If repositories already exist, click Add Repository.
  3. Select Local repository on your workstation.
  4. Enter a repository name.
  5. Choose Manual deployment for the first deployment and select the correct website deployment directory.
  6. Click Create or OK, as displayed.

Push and deploy the content

  1. Copy the repository URL and connection instructions displayed by Plesk.
  2. On your computer, add that URL as a remote in your existing Git repository and push the intended branch, following the displayed instructions.
  3. Return to Websites & Domains > Git and check the received commit and selected deployment branch.
  4. Review the deployment directory, click Deploy, then check the website.

You can enable automatic deployment later if each push to the selected branch should update the site. Creating this repository in Plesk does not create the local repository on your computer.