How to Use Git in Plesk

Plesk has built-in Git integration, allowing you to pull or auto-deploy code from Git repositories directly to your web hosting environment.


Step 1: Log in to Plesk

Go to:

https://your-server-ip:8443

Log in using your Plesk credentials.


Step 2: Open Git Settings for Your Domain

  • Go to Websites & Domains

  • Select the domain or subdomain where you want to deploy the code

  • Click the Git icon under your domain’s tools

Don’t see the Git icon? Make sure the Git extension is installed via Extensions > Extension Catalog > Git.


Step 3: Choose Git Repository Type

You’ll be asked to select a Git repository type:

  • Remote Git Hosting (e.g. GitHub, GitLab, Bitbucket): Plesk will pull from a remote repo

  • Local Repository on the Server: Use this for manual pushes via SSH or other tools


Step 4: Configure Repository Details

For remote repositories:

  • Repository URL: Paste your Git repo link (e.g., https://github.com/yourusername/yourproject.git)

  • Branch: Choose which branch to deploy (usually main or master)

  • Deployment Mode:

    • Automatic deployment: Auto-pull changes on every commit

    • Manual deployment: Pull manually when you want

Click OK to create the Git integration.


Step 5: Set Deployment Path

Choose where the files from the repository should be deployed:

  • Default: /httpdocs

  • You can also choose a subdirectory (e.g., /httpdocs/app)


Step 6: Push or Pull Code

  • If you selected automatic deployment, Plesk will pull from your Git repo each time you push a commit

  • If manual, you can use the Pull Updates button in the Git tool to fetch and deploy changes


Step 7: Monitor Activity

After setup, the Git page will show logs and deployment history so you can track what was pulled and when.


Summary of Git in Plesk

Feature Description
Repo types Remote (GitHub, GitLab, etc.) or local
Branching Supports custom branches
Deployment Automatic or manual
Target Any subdirectory under your domain

 

Was this answer helpful? 0 Users Found This Useful (0 Votes)