---
title: How to deploy website using Plesk git version control
description: "Deploying a website using Plesk's Git version control is a straightforward process. Plesk provides built-in support for Git, allowing you to easily deploy your website from a Git repository. Here’s a step-by-step guide to help you deploy your website using…"
url: "https://truehost.com/support/knowledge-base/how-to-deploy-website-using-plesk-git-version-control/"
updated: "2025-02-10"
category: Plesk
---

# How to deploy website using Plesk git version control

Deploying a website using Plesk's Git version control is a straightforward process. Plesk provides built-in support for Git, allowing you to easily deploy your website from a Git repository. Here’s a step-by-step guide to help you deploy your website using Plesk Git version control:

---

### **Step 1: Prepare Your Git Repository**

1. Ensure your website code is hosted in a Git repository (e.g., GitHub, GitLab, Bitbucket, or any other Git hosting service).
2. Make sure your repository contains all the necessary files for your website (e.g., HTML, CSS, JavaScript, PHP, etc.).

### **Step 2: Log in to Plesk**

1. Log in to your Plesk control panel using your credentials.
2. Navigate to the **Websites & Domains** section for the domain where you want to deploy your website.

![](https://truehost.com/support/wp-content/uploads/2025/02/image-39.png)

### **Step 3: Set Up Git Deployment**

1. In the **Websites & Domains** section, locate and click on **Git** under the domain you want to deploy to.
2. Click on **Add Repository** to set up a new Git repository.

![](https://truehost.com/support/wp-content/uploads/2025/02/image-40-1024x486.png)

![](https://truehost.com/support/wp-content/uploads/2025/02/image-41.png)

### **Step 4: Configure the Git Repository**

1. **Repository URL**: Enter the URL of your Git repository (e.g., `https://github.com/username/repository.git`).
2. **Repository Name**: Provide a name for the repository (this is for internal reference in Plesk).
3. **Branch**: Specify the branch you want to deploy (e.g., `main`, `master`, or any other branch).
4. **Deployment Path**: Choose the directory where the files will be deployed. By default, Plesk will deploy to the `httpdocs` directory (the root of your website). You can change this if needed.
5. **Authentication**: If your repository is private, use ssh key (Auto generated when you enter your Git repo URL using SSH method instead of https)
6. Add the Generated Key to Github or your remote repository.

![](https://truehost.com/support/wp-content/uploads/2025/02/image-42-1024x500.png)

### **Step 5: Enable Automatic Deployment (Optional)**

1. Enable **Automatic Deployment** if you want Plesk to automatically pull changes from the repository whenever you push updates to the specified branch.
2. You can also enable **Deploy after repository is added** to deploy the website immediately after setting up the repository.

![](https://truehost.com/support/wp-content/uploads/2025/02/image-43-1024x547.png)

### **Step 6: Deploy the Website**

1. Click **OK** or **Add** to save the repository settings.
2. If you enabled **Deploy after repository is added**, Plesk will automatically pull the files from the repository and deploy them to the specified directory.
3. If not, you can manually deploy by clicking the **Deploy Now or Pull Now** button in the Git repository settings.

### **Step 7: Verify the Deployment**

1. Once the deployment is complete, visit your website’s URL to ensure it’s working correctly.
2. If you encounter any issues, check the deployment path and ensure all required files are present.

![](https://truehost.com/support/wp-content/uploads/2025/02/image-44-1024x508.png)

### **Step 8: Update Your Website**

1. To update your website, simply push changes to the specified branch in your Git repository.
2. If automatic deployment is enabled, Plesk will pull the changes and update the website automatically. Otherwise, manually click the **Pull Now** button in the Git repository settings.

![](https://truehost.com/support/wp-content/uploads/2025/02/image-45-1024x417.png)

### **Additional Tips**

- **Deployment Scripts**: If you need to run custom scripts during deployment (e.g., `composer install` or `npm build`), you can configure them in the **Additional Actions** section of the Git repository settings.
